Advertisement
constantin-net

flash_update firefox debian-wiki based

Jan 18th, 2019
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.13 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Set Firefox's plugins dir
  4. FIREFOX_FLASH_INSTALL_DIR=~/.mozilla/plugins
  5.  
  6. # Move to /tmp for temporary files
  7. cd /tmp
  8.  
  9. # Setup Arch
  10. case $(uname -m) in
  11.   x86_64) ARCH=x86_64 ;;
  12.     i?86) ARCH=i386 ;;
  13. esac
  14.  
  15. # Check Adobe Flash Player's latest version from Adobe's website
  16. VERSION=$(wget -qO- https://fpdownload.macromedia.com/pub/flashplayer/masterversion/masterversion.xml | grep -m1 "NPAPI_linux version" | cut -d \" -f 2 | tr , .)
  17.  
  18. # Error out if $VERSION is unset, e.g. because previous command failed
  19. if [ -z "$VERSION" ]; then
  20.   printf "Could not work out the latest version; exiting\n" >&2
  21.   exit 1
  22. fi
  23.  
  24. # Exit on first error
  25. set -e
  26.  
  27. # Now get the tarball
  28. wget "https://fpdownload.adobe.com/pub/flashplayer/pdc/$VERSION/flash_player_npapi_linux.${ARCH}.tar.gz"
  29.  
  30. # Extract the contents of the tarball to the Firefox's plugins dir
  31. tar -xof flash_player_npapi_linux.${ARCH}.tar.gz -C $FIREFOX_FLASH_INSTALL_DIR libflashplayer.so
  32.  
  33. #Removing tmp files
  34. rm flash_player_npapi_linux.${ARCH}.tar.gz
  35.  
  36. # Tell the user we are done
  37. printf "\nFlash Player ($VERSION) installed into $FIREFOX_FLASH_INSTALL_DIR/\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement