Flash Plugin Update for Firefox on Linux

I was annoyed by Firefox blocking Flash all the time – or, more to the point, by the necessity for it and the task of downloading and unpacking it, so I wrote a shell script that will do it for me. I run it as root so that the cp at the end will work. You may want to consider setting the privileges on /usr/lib/adobe-flashplugin/ so that that isn’t necessary.

cd /tmp
mkdir flashdownload
cd flashdownload
VERSION=$(curl http://www.adobe.com/software/flash/about/ | grep -A 2 "<td rowspan=\"2\"><strong>Linux</strong></td>" | tail -1 | sed "s/<td>//" | sed "s/<\/td>//" | sed "s/^[ ]*//")
echo "Downloading version "$VERSION
curl https://fpdownload.adobe.com/get/flashplayer/pdc/$VERSION/install_flash_player_11_linux.i386.tar.gz > flashplugin.tar.gz
tar -xzvf flashplugin.tar.gz
cp libflashplayer.so /usr/lib/adobe-flashplugin/
cd ..
rm -rf flashdownload