[Swift-commit] r6396 - branches/release-0.94/bin
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Mon Mar 18 17:10:26 CDT 2013
Author: davidk
Date: 2013-03-18 17:10:26 -0500 (Mon, 18 Mar 2013)
New Revision: 6396
Modified:
branches/release-0.94/bin/gensites
branches/release-0.94/bin/swiftrun
Log:
Adding the swiftrun/gensites from trunk to 0.94
Modified: branches/release-0.94/bin/gensites
===================================================================
--- branches/release-0.94/bin/gensites 2013-03-18 08:16:37 UTC (rev 6395)
+++ branches/release-0.94/bin/gensites 2013-03-18 22:10:26 UTC (rev 6396)
@@ -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: branches/release-0.94/bin/swiftrun
===================================================================
--- branches/release-0.94/bin/swiftrun 2013-03-18 08:16:37 UTC (rev 6395)
+++ branches/release-0.94/bin/swiftrun 2013-03-18 22:10:26 UTC (rev 6396)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash
# Verify an argument is not null
verify_not_null()
@@ -60,6 +60,14 @@
rundir=$( echo run??? | sed -e 's/^.*run//' | awk '{ printf("run%03d\n", $1+1)}' )
mkdir $rundir
+# Link input_files
+if [ -d "input_files" ]; then
+ for input_file in input_files/*
+ do
+ ln -s $PWD/$input_file $rundir
+ done
+fi
+
# Swift script
if [ -f "$script" ]; then
cp $script $rundir
@@ -72,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