You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2012/05/30 20:09:24 UTC

ios commit: update script to be able to execute from anywhere

Updated Branches:
  refs/heads/master 56decbd08 -> b7f443653


update script to be able to execute from anywhere


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/b7f44365
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/b7f44365
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/b7f44365

Branch: refs/heads/master
Commit: b7f4436539ece83f203d75b5e2e6235418fdfdfa
Parents: 56decbd
Author: Anis Kadri <an...@gmail.com>
Authored: Tue May 29 17:11:05 2012 -0700
Committer: Anis Kadri <an...@gmail.com>
Committed: Tue May 29 17:11:05 2012 -0700

----------------------------------------------------------------------
 bin/create |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/b7f44365/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index c5c1b10..fb0f630 100755
--- a/bin/create
+++ b/bin/create
@@ -30,6 +30,7 @@
 #
 set -e
 
+BINDIR=$( cd "$( dirname "$0" )" && pwd )
 PROJECT_PATH=${1:-"./example"}
 PACKAGE=${2:-"org.apache.cordova.example"}
 ACTIVITY=${3:-"CordovaExample"}
@@ -41,7 +42,7 @@ then
 fi
 
 # copy the bitch in; and then rough it up
-cp -r ./bin/templates/project $PROJECT_PATH
+cp -r $BINDIR/templates/project $PROJECT_PATH
 
 # I've tried to be thorough in my documentation of the manual actions below...
 # on first brush it would seem that the right solution would be to brute force
@@ -71,13 +72,13 @@ R=$PROJECT_PATH/$ACTIVITY
 # - ./__TESTING__/Resources/__TESTING__-info.plist
 # - ./__TESTING__/Resources/__TESTING__-Prefix.plist
 
-./bin/replaces $R.xcodeproj/project.pbxproj __TESTING__ $ACTIVITY
-./bin/replaces $R/Classes/AppDelegate.h     __TESTING__ $ACTIVITY
-./bin/replaces $R/Classes/AppDelegate.m     __TESTING__ $ACTIVITY
-./bin/replaces $R/Classes/MainViewController.h     __TESTING__ $ACTIVITY
-./bin/replaces $R/Classes/MainViewController.m     __TESTING__ $ACTIVITY
-./bin/replaces $R/main.m                    __TESTING__ $ACTIVITY
-./bin/replaces $R/$ACTIVITY-info.plist      __TESTING__ $ACTIVITY
-./bin/replaces $R/$ACTIVITY-Prefix.pch      __TESTING__ $ACTIVITY
+$BINDIR/replaces $R.xcodeproj/project.pbxproj __TESTING__ $ACTIVITY
+$BINDIR/replaces $R/Classes/AppDelegate.h     __TESTING__ $ACTIVITY
+$BINDIR/replaces $R/Classes/AppDelegate.m     __TESTING__ $ACTIVITY
+$BINDIR/replaces $R/Classes/MainViewController.h     __TESTING__ $ACTIVITY
+$BINDIR/replaces $R/Classes/MainViewController.m     __TESTING__ $ACTIVITY
+$BINDIR/replaces $R/main.m                    __TESTING__ $ACTIVITY
+$BINDIR/replaces $R/$ACTIVITY-info.plist      __TESTING__ $ACTIVITY
+$BINDIR/replaces $R/$ACTIVITY-Prefix.pch      __TESTING__ $ACTIVITY
 
-./bin/replaces $R/$ACTIVITY-info.plist --ID-- $PACKAGE
+$BINDIR/replaces $R/$ACTIVITY-info.plist --ID-- $PACKAGE