Created
August 14, 2012 04:56
-
-
Save rinrinne/3346386 to your computer and use it in GitHub Desktop.
Update xulrunner for Ubuntu
This file contains 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 | |
if [ `id -u` -ne 0 ]; then | |
echo This command should be run as root. | |
exit 1 | |
fi | |
XROOT=/opt/xulrunner | |
FFVER=$(perl -F/=/ -ane "print \$F[1] if \$F[0] eq 'Milestone'" /usr/lib/firefox/platform.ini) | |
ARCH=`uname -p` | |
XURL=https://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$FFVER/runtimes/xulrunner-$FFVER.en-US.linux-$ARCH.tar.bz2 | |
if [ -d $XROOT/$FFVER ]; then | |
echo xulrunner-$FFVER is up to date. | |
exit 0 | |
fi | |
mkdir -p $XROOT/$FFVER | |
cd $XROOT/$FFVER | |
sh -c "wget -O- $XURL | tar -xj" | |
if [ $? -eq 0 ]; then | |
ln -snf /opt/xulrunner/$FFVER/xulrunner/xulrunner /usr/bin/xulrunner | |
ln -snf /opt/xulrunner/$FFVER/xulrunner/xpcshell /usr/bin/xpcshell | |
echo Finished. | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment