#!/bin/bash if [ -z "$1" ] then echo "Need to pass argument 'trunk', 'testing' or 'experimental'" exit fi if [ "$1" != "trunk" -a "$1" != "testing" -a "$1" != "experimental" ] then echo "Need to pass argument 'trunk', 'testing' or 'experimental'" exit fi echo "Recompiling SAGE [$1] on localhost" cd ~/SAGE/$1 make -j 2 if [ "$?" != 0 ] then echo "Error while compiling" exit fi if [ -e /usr/local/sage ] then echo "Removing sage" sudo rm -r /usr/local/sage fi echo "Installing SAGE" sudo make install cd /usr/local/sage sudo ln -s lib64 lib