From 479c6c424cce4b96966b1e4e208b8114acc06ee4 Mon Sep 17 00:00:00 2001 From: Christoph Niethammer Date: Mon, 2 May 2016 08:55:20 +0000 Subject: [PATCH] Renamed $SCLASSFILE to $sit_classfile and reordered code. --- sit | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sit b/sit index 1b406f6..d774ea5 100755 --- a/sit +++ b/sit @@ -32,6 +32,8 @@ function usage() { exit 0 } +# sit class file to be installed +sit_classfile=$1 # sit action to be performed sit_action=$2 if [[ -n $sit_action ]] ; then @@ -155,12 +157,11 @@ if [ ! -z "$MPI" ] ; then MPI_DIR=${MPI_DIR:=$(dirname $(dirname $(which $MPICC)))} fi -SCLASSFILE=$1 -if [ -f $SCLASS_DIR/$SCLASSFILE ] ; then - source $SCLASS_DIR/$SCLASSFILE +if [ -f $SCLASS_DIR/$sit_classfile ] ; then + source $SCLASS_DIR/$sit_classfile else - sit_fail "Could not find file $SCLASS_DIR/$SCLASSFILE" + sit_fail "Could not find file $SCLASS_DIR/$sit_classfile" fi PACKAGENAME=${PACKAGENAME:=$PACKAGE} @@ -191,7 +192,7 @@ LOGDIR=${WORKDIR} # source the package class file a second time, so we can modify variables # using their default values. (Defaults depend on other vairables in # the class file like CATEGORY or PACKAGE) -source $SCLASS_DIR/$SCLASSFILE +source $SCLASS_DIR/$sit_classfile echo "Package name: $PACKAGENAME" echo "Installation PREFIX: $PREFIX"