[Swift-commit] r4538 - SwiftApps/Montage/exec

jonmon at ci.uchicago.edu jonmon at ci.uchicago.edu
Wed Jun 1 11:19:18 CDT 2011


Author: jonmon
Date: 2011-06-01 11:19:18 -0500 (Wed, 01 Jun 2011)
New Revision: 4538

Modified:
   SwiftApps/Montage/exec/montage.sh
Log:
o SwiftApps/Montage/exec/montage.sh
  -- Changed error message is invalid number of parameters was given
  -- Fixed how the run scipt generated the run directories


Modified: SwiftApps/Montage/exec/montage.sh
===================================================================
--- SwiftApps/Montage/exec/montage.sh	2011-06-01 14:52:55 UTC (rev 4537)
+++ SwiftApps/Montage/exec/montage.sh	2011-06-01 16:19:18 UTC (rev 4538)
@@ -4,13 +4,13 @@
 
 if [ $# -ne $EXPECTED_ARGS ]
 then
-    echo "Did not specify how many workers are to be run"
+    echo "Did not specify valid parameters"
     exit 1
 fi
 
-RUN_DIRECTORY=(`ls | grep run`)
-len=${#RUN_DIRECTORY[*]}
-WORK_DIRECTORY=(`printf "run.%04d" $len`)
+RUN_DIRECTORY=(`ls | grep run | tail -n 1`)
+NUM=`echo $RUN_DIRECTORY | awk -F . '{print $NF}'`
+WORK_DIRECTORY=(`printf "run.%04d" $((NUM+1))`)
 
 mkdir ${WORK_DIRECTORY}
 




More information about the Swift-commit mailing list