X-Git-Url: https://git.ucc.asn.au/?p=uccvend-vagrant.git;a=blobdiff_plain;f=scripts%2FBuildAndInstall.sh;fp=scripts%2FBuildAndInstall.sh;h=a5864157a2783c448e4a0b02d9720f5b015c24a6;hp=0000000000000000000000000000000000000000;hb=712674f9fdeeb9ae3a135d43612246e8c1e8188e;hpb=7bdb678756e18764a306b85c86ddfe8144ae1e9a diff --git a/scripts/BuildAndInstall.sh b/scripts/BuildAndInstall.sh new file mode 100755 index 0000000..a586415 --- /dev/null +++ b/scripts/BuildAndInstall.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# BuildAndInstall.sh + +# This script will build the various bits of the UCC Vend infrastructure +# and run their install scripts + +# error handling +abort() +{ + echo >&2 '*** ABORTED ***' + echo "An error occurred. Exiting..." >&2 + exit 1 +} + +trap 'abort' 0 + +set -e + +# If an error occurs, the abort() function will be called. +#---------------------------------------------------------- + + +CODEDIR=/vagrant/code + +# build and install dispense + +cd $CODEDIR/opendispense2/src + +make +sudo make install + +# build SNACKROM + +cd $CODEDIR/uccvend-snackrom/ROM2 + +make + +# vendserver + +cd $CODEDIR/uccvend-vendserver + +python setup.py build +sudo python setup.py install + +# virtualsnack +# virtualcoke + +# for the moment, until these are changed to use setuptools, left +# in /vagrant/code + +# Done! +trap : 0 +