Skip to content

Instantly share code, notes, and snippets.

@TaurusOlson
Created December 12, 2012 11:59
Show Gist options
  • Save TaurusOlson/4267233 to your computer and use it in GitHub Desktop.
Save TaurusOlson/4267233 to your computer and use it in GitHub Desktop.
#!/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
@TaurusOlson
Copy link
Author

Aliases can be created. For example for people working only with HIFI:

alias install-dp-hifi='install-hcss dp hifi'
alias install-icc-hifi='install-hcss icc hifi'

Now install-dp-hifi 8.0 2931 will install the HIPE 8.0 build 2931 specifically from HIFI dp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment