[Swift-commit] r6150 - trunk/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Thu Jan 10 16:11:33 CST 2013


Author: davidk
Date: 2013-01-10 16:11:32 -0600 (Thu, 10 Jan 2013)
New Revision: 6150

Modified:
   trunk/bin/swiftrun
Log:
Fix for handling config files


Modified: trunk/bin/swiftrun
===================================================================
--- trunk/bin/swiftrun	2013-01-10 21:43:22 UTC (rev 6149)
+++ trunk/bin/swiftrun	2013-01-10 22:11:32 UTC (rev 6150)
@@ -48,8 +48,8 @@
    case "$1" in
       -site|-sites|-s) SITES=$2; verify_not_null sites $SITES; shift ;;
       -config|-c) CONFIG=$2; verify_not_null config $CONFIG; shift ;;
-      *) if [ -z "$args" ]; then script="$1"
-         else args+="$1"
+      *) if [ -z "$script" ]; then script="$1"
+         else args+="$1 "
          fi ;;
    esac
    shift
@@ -83,5 +83,9 @@
 # Run
 timestamp=$( date +%s )
 ln -s $PWD $HOME/.swift/runs/current/$rundir.$timestamp 
-time swift -sites.file sites.xml -tc.file tc.data $script $args 2>&1 | tee swift.out
+if [ -n "$CONFIG" ]; then
+   eval time swift -sites.file sites.xml -tc.file tc.data -config $CONFIG $script $args 2>&1 | tee swift.out
+else
+   eval time swift -sites.file sites.xml -tc.file tc.data $script $args 2>&1 | tee swift.out
+fi
 mv $HOME/.swift/runs/current/$rundir.$timestamp $HOME/.swift/runs/completed




More information about the Swift-commit mailing list