[Swift-commit] r6388 - trunk/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Sun Mar 17 09:25:33 CDT 2013


Author: davidk
Date: 2013-03-17 09:25:32 -0500 (Sun, 17 Mar 2013)
New Revision: 6388

Modified:
   trunk/bin/gensites
   trunk/bin/swiftrun
Log:
Add conf/ to list of directories to search for templates


Modified: trunk/bin/gensites
===================================================================
--- trunk/bin/gensites	2013-03-17 07:49:58 UTC (rev 6387)
+++ trunk/bin/gensites	2013-03-17 14:25:32 UTC (rev 6388)
@@ -125,6 +125,8 @@
       TEMPLATE_PATH=$TEMPLATE
    elif [ -f "$HOME/.swift/sites/$TEMPLATE" ]; then
       TEMPLATE_PATH=$HOME/.swift/sites/$TEMPLATE
+   elif [ -f "$PWD/conf/$TEMPLATE" ]; then
+      TEMPLATE_PATH=$PWD/conf/$TEMPLATE
    elif [ -f "$SWIFT_HOME/$TEMPLATE" ]; then
       TEMPLATE_PATH=$SWIFT_HOME/$TEMPLATE
    fi

Modified: trunk/bin/swiftrun
===================================================================
--- trunk/bin/swiftrun	2013-03-17 07:49:58 UTC (rev 6387)
+++ trunk/bin/swiftrun	2013-03-17 14:25:32 UTC (rev 6388)
@@ -1,4 +1,4 @@
-#!/bin/bash 
+#!/bin/bash -x
 
 # Verify an argument is not null
 verify_not_null()
@@ -80,25 +80,26 @@
 fi
 
 # Create sites.xml
-cd $rundir
 IFS=","
-echo "<config>" > sites.xml
+echo "<config>" > $rundir/sites.xml
 for site in $SITES
 do
    # If config is not defined, but there is a config in conf/ that matches, use that
-   if [ -z "$CONFIG" ] && [ -f "../conf/$site.cf" ]; then
-      cp ../conf/$site.cf .
+   if [ -z "$CONFIG" ] && [ -f "conf/$site.cf" ]; then
+      cp conf/$site.cf $rundir
       config=$site.cf
    fi  
 
-   if [ -f "$config" ]; then
-      gensites -p $config $site >> sites.xml
+   if [ -f "conf/$config" ]; then
+      gensites -p conf/$config $site >> $rundir/sites.xml
    else
-      gensites $site >> sites.xml
+      gensites $site >> $rundir/sites.xml
    fi
 
 done
-echo "</config>" >> sites.xml
+echo "</config>" >> $rundir/sites.xml
+mv tc.data $rundir
+cd $rundir
 
 if [ -z "$CONFIG" ]; then
    CONFIG=$config




More information about the Swift-commit mailing list