A simple bash script to install flash for mozilla and/or chromium browser on any linux system.
sript usage:
To install for fedora use
sh installflash.sh mozilla
To install for chromuin use
sh installflash.sh chromium
For both use
sh installflash.sh mozilla chromium
IMPORTANT :: the script must be excecuted as root
####################################################
#!/bin/sh
if [ -z $1 ]
then
echo "Arguements missings"
echo
echo "To install for fedora use"
echo " sh installflash.sh mozilla"
echo
echo "To install for chromuin use"
echo " sh installflash.sh chromium"
echo
echo "For both use "
echo " sh installflash.sh mozilla chromium"
echo
exit 1
fi
if (( $EUID != 0 ))
then
echo "This scritp must be run as root"
exit 1
fi
echo "Downloading flash files from adobe"
mkdir temp
cd temp
wget http://fpdownload.macromedia.com/get/flashplayer/pdc/11.2.202.236/install_flash_player_11_linux.x86_64.tar.gz
tar -xvf install_flash_player_11_linux.x86_64.tar.gz
if [ -n $2 ]
then
echo "installing flash for mozilla"
mv libflashplayer.so /usr/lib64/mozilla/plugins/ 2> /dev/null
if (( $? != 0 ))
then
mkdir usr/lib64/mozilla/plugins/
mv libflashplayer.so /usr/lib64/mozilla/plugins/
fi
echo "installing flash for chromium"
mv libflashplayer.so /usr/lib64/chromium-browser/plugins/ 2> /dev/null
if (( $? != 0 ))
then
mkdir usr/lib64/mozilla/plugins/
mv libflashplayer.so /usr/lib64/chromium-browser/plugins/
fi
fi
if [ $1 = "mozilla" ]
then
echo "installing flash for mozilla"
mv libflashplayer.so /usr/lib64/mozilla/plugins/ 2> /dev/null
if (( $? != 0 ))
then
mkdir usr/lib64/mozilla/plugins/
mv libflashplayer.so /usr/lib64/mozilla/plugins/
fi
fi
if [ $1 = "chromium" ]
then
echo "installing flash for chromium"
mv libflashplayer.so /usr/lib64/chromium-browser/plugins/ 2> /dev/null
if (( $? != 0 ))
then
mkdir usr/lib64/mozilla/plugins/
mv libflashplayer.so /usr/lib64/chromium-browser/plugins/
fi
fi
rm -rf temp/
rmdir temp
###################################################
0 comments:
Post a Comment