[Swift-commit] r5342 - trunk/bin/grid

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Mon Dec 5 11:24:46 CST 2011


Author: ketan
Date: 2011-12-05 11:24:46 -0600 (Mon, 05 Dec 2011)
New Revision: 5342

Modified:
   trunk/bin/grid/run-gwms-workers
Log:
args validation in run-gwms-workers

Modified: trunk/bin/grid/run-gwms-workers
===================================================================
--- trunk/bin/grid/run-gwms-workers	2011-12-05 17:19:33 UTC (rev 5341)
+++ trunk/bin/grid/run-gwms-workers	2011-12-05 17:24:46 UTC (rev 5342)
@@ -1,10 +1,17 @@
 #!/bin/bash
 
+die () {
+    echo >&2 "$@"
+    exit 1
+}
+
 workerExecutable=`which worker.pl`
 workerWrapper=`which run-worker.sh`
 workerContact=$1
 n=$2
 
+[ "$#" -eq 2 ] || die "2 arguments required, $# provided"
+
 cat > myjob.condor <<EOF
 universe = vanilla
 
@@ -34,4 +41,3 @@
 EOF
 
 condor_submit myjob.condor
-




More information about the Swift-commit mailing list