You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2012/06/28 01:28:02 UTC

webworks commit: CB-965: fixed create script to work with distribution and src

Updated Branches:
  refs/heads/master a03c2e8cd -> 6869701d2


CB-965: fixed create script to work with distribution and src


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/commit/6869701d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/tree/6869701d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/diff/6869701d

Branch: refs/heads/master
Commit: 6869701d2570154e7fda014a43c68fe35beeabb9
Parents: a03c2e8
Author: Steven Gill <st...@gmail.com>
Authored: Wed Jun 27 16:27:46 2012 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Wed Jun 27 16:27:46 2012 -0700

----------------------------------------------------------------------
 bin/create |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/6869701d/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index fe91d1c..62679ba 100755
--- a/bin/create
+++ b/bin/create
@@ -64,15 +64,22 @@ ANT=$(which ant)
 
 MANIFEST_PATH=$PROJECT_PATH/www/config.xml
 
-# compile cordova.js and cordova.jar
-echo "Building cordova-$VERSION.jar and cordova-$VERSION.js ..."
-(cd $BUILD_PATH && $ANT dist &> /dev/null )
+# compile cordova.js and cordova.jar if in source, ignore if in distribution
+if [ ! -e $BUILD_PATH/www/ext/cordova-$VERSION.jar ] && [ -d $BUILD_PATH/framework ]
+then
+	echo "Building cordova-$VERSION.jar and cordova-$VERSION.js ..."
+	(cd $BUILD_PATH && $ANT dist &> /dev/null )
+	
+	# copy project template
+	echo "Copying assets and resources ..."
+	cp -r $BUILD_PATH/dist/sample/. $PROJECT_PATH
+else
+	# copy project template if in distribution
+	echo "Copying assets and resources ..."
+	cp -r $BUILD_PATH/sample/. $PROJECT_PATH
+fi
+
 
-# copy project template
-echo "Copying assets and resources ..."
-cp -r $BUILD_PATH/dist/sample/. $PROJECT_PATH
-# re-copy over cordova scripts because ant doesn't preserve file modes when copying
-cp -r -p $BUILD_PATH/bin/templates/project/cordova $PROJECT_PATH
 
 # interpolate the app name into config.xml
 echo "Updating config.xml ..."