Files
personal-utilities/firefox.sh
T
Eric Phillips 6f75701e04 first commit
2010-10-03 18:17:17 -06:00

30 lines
726 B
Bash
Executable File

#!/bin/bash
#called with mode to select which tar ball to use
if [ -z $1 ] #test for mode option, exit if not present
then
echo "Must select mode"
echo "ie: firefox.sh priv"
exit 1
fi
MODE=$1
UPDATE=$2
if test -z "$(mount | grep firefox)"
then
mount "${HOME}/.mozilla"
fi
cd "${HOME}/.mozilla"
tar xf "${HOME}/conf/mozilla-${MODE}.tar.lzo" --use-compress-program lzop
/usr/bin/firefox
if [[ -n $UPDATE ]]
then
tar cf "mozilla-${MODE}.tar" "./firefox"
lzop -7U "mozilla-${MODE}.tar"
cp "${HOME}/conf/mozilla-${MODE}.tar.lzo" "${HOME}/conf/mozilla-${MODE}.tar.lzo.old"
cp "./mozilla-${MODE}.tar.lzo" "${HOME}/conf/mozilla-${MODE}.tar.lzo"
fi
rm -r firefox
rm -r extensions
rm mozilla*.tar.lzo