Last active
August 29, 2015 14:05
-
-
Save wernight/a3c1e30a3c64e350197f to your computer and use it in GitHub Desktop.
Find and install the latest Flash plugin debug for Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# Find the latest Flash plugin debug for Linux and install it removing the standard plugin first. | |
# | |
# Usage: curl https://gist.githubusercontent.com/wernight/a3c1e30a3c64e350197f/raw/8c49f7c521a9ccb215edcdf9696642f37edbbb08/flash-debug.sh | sh | |
echo "Finding latest version from http://www.adobe.com/support/flashplayer/downloads.html" | |
flash_download=$(curl --silent http://www.adobe.com/support/flashplayer/downloads.html | grep -Po '(?<=")http[^"]*flashplayer_\d+_plugin_debug[^"]*\.tar\.gz(?=")' | head -n 1) | |
echo "Found and extracting $flash_download" | |
tmp_dir=/tmp/flashplayer_plugin_debug | |
if [ -d $tmp_dir ] | |
then | |
rm -rf $tmp_dir | |
fi | |
mkdir $tmp_dir | |
curl -0 "$flash_download" | tar xzC $tmp_dir | |
echo "Removing existing Flash plugin for Firefox" | |
sudo killall --quiet -9 firefox && sleep 1 || true | |
sudo rm -f /usr/lib/mozilla/plugins/*flash* ~/.mozilla/plugins/*flash* /usr/lib/firefox/plugins/*flash* /usr/lib/firefox-addons/plugins/*flash* | |
echo "Installing debug plugin for Firefox" | |
sudo cp $tmp_dir/libflashplayer.so /usr/lib/mozilla/plugins | |
sudo chmod +rx /usr/lib/mozilla/plugins/libflashplayer.so | |
sudo nspluginwrapper -i /usr/lib/mozilla/plugins/libflashplayer.so | |
sudo ln -sf /usr/lib/mozilla/plugins/ /usr/lib/firefox-addons/plugins/ | |
echo "Cleaning up $tmp_dir" | |
rm -rf $tmp_dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment