Created
December 12, 2012 11:59
-
-
Save TaurusOlson/4267233 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
set -e | |
# INSTALLATION OPTIONS | |
TEST=yes | |
SRC=yes | |
UNPACK=yes | |
die () { echo "Wrong argument: $@"; exit; } | |
usage() { | |
cat << EOF | |
Usage: $(basename $0) ORIGIN INSTRUMENT TRACK BUILD | |
example: | |
install-hcss icc hifi 8.0 2931 | |
$(basename $0) installs the hcss software with the following options: | |
test = $TEST | |
src = $SRC | |
unpack= $UNPACK | |
EOF | |
} | |
if [[ $# == 4 ]]; then | |
ORIGIN=$1 | |
INSTRUMENT=$2 | |
TRACK=$3 | |
BUILD=$4 | |
# Checks | |
[ $ORIGIN != 'icc' ] &&\ | |
[ $ORIGIN != 'dp' ] && die "Choose between icc or dp." | |
[ $INSTRUMENT != 'hifi' ] &&\ | |
[ $INSTRUMENT != 'spire' ] &&\ | |
[ $INSTRUMENT != 'pacs' ] && die "Choose between hifi spire or pacs." | |
cd $HOME/hcss | |
./hcss.installer --test=$TEST --src=$SRC --unpack=$UNPACK hcss.$ORIGIN.$INSTRUMENT $TRACK $BUILD | |
else | |
usage | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Aliases can be created. For example for people working only with HIFI:
Now
install-dp-hifi 8.0 2931
will install the HIPE 8.0 build 2931 specifically from HIFI dp.