[Swift-commit] r5682 - trunk/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Sat Feb 25 22:31:40 CST 2012


Author: davidk
Date: 2012-02-25 22:31:40 -0600 (Sat, 25 Feb 2012)
New Revision: 5682

Modified:
   trunk/bin/gensites
Log:
More reliable way to find template directory.. assume that gensites is included in a swift distribution, and don't rely on PATH


Modified: trunk/bin/gensites
===================================================================
--- trunk/bin/gensites	2012-02-26 03:48:39 UTC (rev 5681)
+++ trunk/bin/gensites	2012-02-26 04:31:40 UTC (rev 5682)
@@ -76,10 +76,9 @@
 
 # Determine SWIFT_HOME
 if [ -z "$SWIFT_HOME" ]; then
-   SWIFT_BIN_DIR=`which swift`
-
+   SWIFT_BIN_DIR="$( cd "$( dirname "$0" )" && pwd )"
    if [ ! -d "$SWIFT_HOME" ]; then
-      SWIFT_HOME=`dirname $SWIFT_BIN_DIR`"/../etc/sites"
+      SWIFT_HOME="$( cd $SWIFT_BIN_DIR/../etc/sites  && pwd )" 
    fi
  
    # Can't find swift path, give up




More information about the Swift-commit mailing list