Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- root="/path/to"
- if [ -z "$1" ]; then
- echo -e "Usage:\t$0 <source>"
- exit 1
- fi
- src=$1
- cd $root
- if [ $src = "sty+ct" ]; then
- source="0.2.8-armagetronad-sty+ct"
- branch="lp:~armagetronad-ct/armagetronad/0.2.8-armagetronad-sty+ct"
- elif [ $src = "sty+ct+ap" ]; then
- source="0.2.9-armagetronad-sty+ct+ap"
- branch="lp:~armagetronad-ap/armagetronad/0.2.9-armagetronad-sty+ct+ap"
- else
- echo -x "Unrecognised source tag \""$src"\""
- exit 1
- fi
- saveto=$root
- echo -e "Downloading "$src"..."
- rm -rf $source
- bzr branch $branch
- if [ $? -ne 0 ]; then
- echo -e "Error while downloading."
- exit 1
- fi
- cd $root"/"$source
- echo -e "Bootstrappng..."
- ./bootstrap.sh
- if [ $? -ne 0 ]; then
- echo -e "Error while bootstrapping."
- exit 1
- fi
- echo -e "Configuring..."
- CXXFLAGS="-pipe" ./configure --enable-dedicated --enable-armathentication --disable-automakedefaults --disable-sysinstall --disable-useradd --disable-etc --disable-desktop --disable-initscripts --disable-uninstall --disable-games --prefix=$saveto
- if [ $? -ne 0 ]; then
- echo -e "Error while configuring."
- exit 1
- fi
- echo -e "Compiling..."
- make
- if [ $? -ne 0 ]; then
- echo -e "Error while compiling."
- exit 1
- fi
- echo -e "Installing..."
- make install
- if [ $? -ne 0 ]; then
- echo -e "Error while installing."
- exit 1
- fi
- echo -e "Done!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement