From fd9125d38e276f0bf36e656d7f6a4a79a79ffb80 Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Mon, 9 Oct 2006 12:58:03 +1000 Subject: [PATCH] Added override parameters for target host and target dir for an instrument. r1125 | ffr | 2006-10-09 12:58:03 +1000 (Mon, 09 Oct 2006) | 2 lines --- site_ansto/instrument/deploySICS.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/site_ansto/instrument/deploySICS.sh b/site_ansto/instrument/deploySICS.sh index dbb4c00b..c851aedd 100755 --- a/site_ansto/instrument/deploySICS.sh +++ b/site_ansto/instrument/deploySICS.sh @@ -1,6 +1,6 @@ #!/bin/sh -# $Revision: 1.1 $ -# $Date: 2006-09-07 02:46:42 $ +# $Revision: 1.2 $ +# $Date: 2006-10-09 02:58:03 $ # Author: Ferdi Franceschini (ffr@ansto.gov.au) # Last revision by $Author: ffr $ @@ -12,43 +12,44 @@ usage() { echo deploySICS.sh copies SICS and the files listed echo in the MANIFEST.TXT files to the IC host. -echo -e "Usage:\t./deploySICS.sh INSTRUMENT"; +echo -e "Usage:\t./deploySICS.sh INSTRUMENT [TARGET_HOST TARGET_DIR]"; echo -e "\twhere INSTRUMENT can be hrpd, echidna, hipd, wombat ..."; } -if [ $# -eq 0 ] +if [ $# -eq 0 -o $# -eq 2 -o $# -gt 3 ] then usage + exit 1 fi INSTRUMENT=$1 SRCDIR=./ -DESTDIR=/usr/local/sics/server +DESTDIR=${3:-/usr/local/sics/server} # Set the destination host and the # instrument src directory case $INSTRUMENT in hrpd|echidna) -DESTHOST=ic-echidna.nbi.ansto.gov.au +DESTHOST=${2:-ic-echidna.nbi.ansto.gov.au} INSTSRC=hrpd;; hipd|wombat) -DESTHOST=ic-wombat.nbi.ansto.gov.au +DESTHOST=${2:-ic-wombat.nbi.ansto.gov.au} INSTSRC=hipd;; qld|koala) -DESTHOST=ic-koala.nbi.ansto.gov.au +DESTHOST=${2:-ic-koala.nbi.ansto.gov.au} INSTSRC=qld;; reflectometer|platypus) -DESTHOST=ic-platypus.nbi.ansto.gov.au +DESTHOST=${2:-ic-platypus.nbi.ansto.gov.au} INSTSRC=reflectometer;; rsd|kowari) -DESTHOST=ic-kowari.nbi.ansto.gov.au +DESTHOST=${2:-ic-kowari.nbi.ansto.gov.au} INSTSRC=qld;; sans|quokka) -DESTHOST=ic-quokka.nbi.ansto.gov.au +DESTHOST=${2:-ic-quokka.nbi.ansto.gov.au} INSTSRC=sans;; tas|taipan) -DESTHOST=ic-taipan.nbi.ansto.gov.au +DESTHOST=${2:-ic-taipan.nbi.ansto.gov.au} INSTSRC=tas;; esac