Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Set Firefox's plugins dir
- FIREFOX_FLASH_INSTALL_DIR=~/.mozilla/plugins
- # Move to /tmp for temporary files
- cd /tmp
- # Setup Arch
- case $(uname -m) in
- x86_64) ARCH=x86_64 ;;
- i?86) ARCH=i386 ;;
- esac
- # Check Adobe Flash Player's latest version from Adobe's website
- VERSION=$(wget -qO- https://fpdownload.macromedia.com/pub/flashplayer/masterversion/masterversion.xml | grep -m1 "NPAPI_linux version" | cut -d \" -f 2 | tr , .)
- # Error out if $VERSION is unset, e.g. because previous command failed
- if [ -z "$VERSION" ]; then
- printf "Could not work out the latest version; exiting\n" >&2
- exit 1
- fi
- # Exit on first error
- set -e
- # Now get the tarball
- wget "https://fpdownload.adobe.com/pub/flashplayer/pdc/$VERSION/flash_player_npapi_linux.${ARCH}.tar.gz"
- # Extract the contents of the tarball to the Firefox's plugins dir
- tar -xof flash_player_npapi_linux.${ARCH}.tar.gz -C $FIREFOX_FLASH_INSTALL_DIR libflashplayer.so
- #Removing tmp files
- rm flash_player_npapi_linux.${ARCH}.tar.gz
- # Tell the user we are done
- printf "\nFlash Player ($VERSION) installed into $FIREFOX_FLASH_INSTALL_DIR/\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement