[Swift-commit] r7270 - trunk/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Mon Nov 4 12:32:54 CST 2013


Author: davidk
Date: 2013-11-04 12:32:54 -0600 (Mon, 04 Nov 2013)
New Revision: 7270

Modified:
   trunk/bin/gensites
Log:
Only replace template names if -n is specified


Modified: trunk/bin/gensites
===================================================================
--- trunk/bin/gensites	2013-11-04 16:13:16 UTC (rev 7269)
+++ trunk/bin/gensites	2013-11-04 18:32:54 UTC (rev 7270)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash 
 
 # crash: Report a problem and exit
 crash()
@@ -208,7 +208,10 @@
    fi
    SED_COMMAND+="-e s@"\_$value\_"@${!value}@g "
 done
-SED_COMMAND+=" -e s@\"$HOSTS\"@\"$NEW_TEMPLATE_NAME\"@g "
+if [ -n "$NEW_TEMPLATE_NAME" ]; then
+   SED_COMMAND+=" -e s@\"$HOSTS\"@\"$NEW_TEMPLATE_NAME\"@g "
+fi
+
 len=$( echo $SED_COMMAND |wc -w )
 if [ $len -gt 1 ]; then
    $SED_COMMAND $TEMPLATE_PATH




More information about the Swift-commit mailing list