diff --git a/site_ansto/instrument/deploySICS.sh b/site_ansto/instrument/deploySICS.sh index 233d2776..1aaebcbc 100755 --- a/site_ansto/instrument/deploySICS.sh +++ b/site_ansto/instrument/deploySICS.sh @@ -1,6 +1,6 @@ #!/bin/sh -# $Revision: 1.24 $ -# $Date: 2007-05-11 07:29:57 $ +# $Revision: 1.25 $ +# $Date: 2007-05-15 02:31:22 $ # Author: Ferdi Franceschini (ffr@ansto.gov.au) # Last revision by $Author: dcl $ @@ -54,7 +54,9 @@ copy_server_config() { fi } -if [ "$1" = "-n" ] +shopt -s nocasematch + +if [[ "$1" = "-n" ]] then DEPLOY="NO" shift @@ -70,7 +72,7 @@ fi TESTING=$(dirname "$1") INSTRUMENT=$(basename "$1") -if [ "$INSTRUMENT" = "test" ] +if [[ "$INSTRUMENT" = "test" ]] then TESTING=$(basename "$1") INSTRUMENT=$(dirname "$1") @@ -123,7 +125,7 @@ INSTCFDIR=$INSTSRC/config make -C ../ $INSTRUMENT || exit $? -if [ "$TESTING" = "test" ] +if [[ "$TESTING" = "test" ]] then DESTHOST=${2:-ics1-test.nbi.ansto.gov.au} DESTDIR=${3:-/usr/local}/TEST_SICS/$INSTRUMENT @@ -148,7 +150,7 @@ fi echo "Deploying $INSTRUMENT to $DESTHOST:$DESTDIR" -if [ "$DESTHOST" = "localhost" ] +if [[ "$DESTHOST" = "localhost" ]] then EXTRACT="tar vxzp -C /" EXTRACT_NODEPLOY="tar vxzp -C /" @@ -204,7 +206,7 @@ find $TARDIR -type f -perm -100 -exec chmod go+x {} \; find $TARDIR -type d -exec chmod u+rwx,g+rwxs,o-w+rx {} \; # Strip leading / from DESTDIR and extract to destination -if [ "$DEPLOY" = "YES" ] +if [[ "$DEPLOY" = "YES" ]] then tar -cz $TARDIR | $EXTRACT else