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/385122d8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/385122d8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/385122d8 Branch: refs/heads/master Commit: 385122d896c2d32a0f0102f20a7159a9523fbe74 Parents: 0cd6873 Author: Shazron Abdullah <shaz...@apache.org> Authored: Wed Jul 25 18:01:15 2012 -0700 Committer: Shazron Abdullah <shaz...@apache.org> Committed: Wed Jul 25 18:01:15 2012 -0700 ---------------------------------------------------------------------- bin/create | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/385122d8/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