Created
September 22, 2011 23:51
-
-
Save ctbarna/1236387 to your computer and use it in GitHub Desktop.
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
# Shell script to install PARI/GP | |
VERSION=2.5.0 | |
URL=http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-$VERSION.tar.gz | |
DATE=`date +%s` | |
# Credit to http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in | |
DIR="$( cd "$( dirname "$0" )" && pwd )" | |
mkdir $DIR/tmp$DATE | |
cd $DIR/tmp$DATE | |
trap 'echo "Cleaning up..."; cd $DIR; rm -rf tmp$DATE' 0 2 3 | |
echo "Downloading $URL..." | |
curl -C - -O $URL | |
echo "Unpacking pari-$VERSION.tar.gz" | |
tar -xzf pari-$VERSION.tar.gz | |
cd pari-$VERSION | |
echo "Configuring pari-$VERSION" | |
./Configure | |
echo "Building and installing pari-$VERSION. Enter your password." | |
sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment