[Swift-commit] r4122 - branches/release-0.92/bin

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sat Feb 19 15:29:00 CST 2011


Author: davidk
Date: 2011-02-19 15:29:00 -0600 (Sat, 19 Feb 2011)
New Revision: 4122

Modified:
   branches/release-0.92/bin/gensites
Log:
Gensites swift.properties syntax changes and variable evaluation


Modified: branches/release-0.92/bin/gensites
===================================================================
--- branches/release-0.92/bin/gensites	2011-02-19 05:48:29 UTC (rev 4121)
+++ branches/release-0.92/bin/gensites	2011-02-19 21:29:00 UTC (rev 4122)
@@ -9,11 +9,12 @@
 }
 
 # get_value: Return the right hand side of an equals
-# statment in swift.properties format: gensites.foo=bar
+# statment in swift.properties format: #site sitename option=value
 # will return bar
 get_value()
 {
-   echo $2 |cut -d "=" -f2
+   for last; do true; done
+   eval echo $last |cut -d "=" -f2
 }
 
 # Verify an argument is not null
@@ -137,25 +138,25 @@
 while read line
 do
    case "$line" in
-      \#$TEMPLATE" work="*|'#gensites work='*) 
+      "#site $TEMPLATE work="*|'#site work='*) 
          WORK=`get_value $line`
          ;;
-      \#$TEMPLATE" globus_hostname="*|'#gensites globus_hostname=') 
+      "#site $TEMPLATE globus_hostname="*|'#site globus_hostname=') 
          GLOBUS_HOSTNAME=`get_value $line`
          ;;
-      \#$TEMPLATE" nodes="*|'#gensites nodes='*)
+      "#site $TEMPLATE nodes="*|'#site nodes='*)
          NODES=`get_value $line`
          ;;
-      \#$TEMPLATE" project="*|'#gensites project='*)
+      "#site $TEMPLATE project="*|'#site project='*)
          PROJECT=`get_value $line`
          ;;
-      \#$TEMPLATE" queue="*|'#gensites queue='*)
+      "#site $TEMPLATE queue="*|'#site queue='*)
          QUEUE=`get_value $line`
          ;;
-      \#$TEMPLATE" n_gran="*|'#gensites n_gran='*)
+      "#site $TEMPLATE n_gran="*|'#site n_gran='*)
          N_GRAN=`get_value $line`
          ;;
-      \#$TEMPLATE" n_max="*|'#gensites n_max='*)
+      "#site $TEMPLATE n_max="*|'#site n_max='*)
          MAXTIME=`get_value $line`
          ;;
    esac




More information about the Swift-commit mailing list