[Swift-commit] r7396 - trunk/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Tue Dec 10 14:25:35 CST 2013


Author: davidk
Date: 2013-12-10 14:25:35 -0600 (Tue, 10 Dec 2013)
New Revision: 7396

Modified:
   trunk/bin/swift
   trunk/bin/swiftrun
Log:
A few more updates related to setting paths


Modified: trunk/bin/swift
===================================================================
--- trunk/bin/swift	2013-12-10 20:11:19 UTC (rev 7395)
+++ trunk/bin/swift	2013-12-10 20:25:35 UTC (rev 7396)
@@ -29,7 +29,7 @@
 ####### MAIN BODY ##########
 
 if [ ! -d "$SWIFT_HOME" ] ; then
-    SWIFT_HOME=`dirname $0`"/.."
+    SWIFT_HOME=$(cd $(dirname $0)/..; pwd)
     if [ ! -f "$SWIFT_HOME/lib/cog-swift-svn.jar" ] && [ ! -f "$SWIFT_HOME/lib/cog.jar" ] ; then
 		MY_PATH=`which $0`
 		SWIFT_HOME=`dirname $MY_PATH`"/.."

Modified: trunk/bin/swiftrun
===================================================================
--- trunk/bin/swiftrun	2013-12-10 20:11:19 UTC (rev 7395)
+++ trunk/bin/swiftrun	2013-12-10 20:25:35 UTC (rev 7396)
@@ -348,7 +348,7 @@
 }
 
 # Verify Swift is found in PATH
-my $swift_etc_directory = dirname(dirname(`which swift`)) . "/etc";
+my $swift_etc_directory = dirname(dirname($0)) . "/etc";
 if( ! -d $swift_etc_directory ) { &swiftquit("Unable to find a valid Swift installation"); }
 
 # Set the search order for properties




More information about the Swift-commit mailing list