incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [13/15] ios commit: Fixed bin/create to detect both symlinks and regular paths
Date Mon, 30 Jul 2012 19:58:36 GMT
Fixed bin/create to detect both symlinks and regular paths


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/6e7ff96e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/6e7ff96e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/6e7ff96e

Branch: refs/heads/master
Commit: 6e7ff96e10d5ed3f610df0cf03a5ce2ec3e3f68e
Parents: cfa66b5
Author: Shazron Abdullah <shazron@apache.org>
Authored: Wed Jul 25 18:01:15 2012 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Mon Jul 30 12:52:25 2012 -0700

----------------------------------------------------------------------
 bin/create |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/6e7ff96e/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index cf29516..349b2b8 100755
--- a/bin/create
+++ b/bin/create
@@ -44,8 +44,13 @@ if [ $# -lt 3 ]; then
 fi
 
 # the two lines below are to get the current folder, and resolve symlinks
-SCRIPT=`readlink $0`
-BINDIR=`dirname $SCRIPT`
+SCRIPT="$0"
+# need this for relative symlinks
+while [ -h "$SCRIPT" ] ; do
+   SCRIPT=`readlink "$SCRIPT"`
+done
+
+BINDIR=$( cd "$( dirname "$SCRIPT" )" && pwd )
 
 PROJECT_PATH=$1
 PACKAGE=$2


Mime
View raw message