You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2013/03/06 01:14:13 UTC

android commit: CB-2623: Updated windows script, now it works here too for once

Updated Branches:
  refs/heads/master 9a71cc5b4 -> 42c8105f1


CB-2623: Updated windows script, now it works here too for once


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/42c8105f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/42c8105f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/42c8105f

Branch: refs/heads/master
Commit: 42c8105f139bb6f28ee682051d8439124a6af951
Parents: 9a71cc5
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Mar 5 16:06:53 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Tue Mar 5 16:13:43 2013 -0800

----------------------------------------------------------------------
 bin/update.js |   18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/42c8105f/bin/update.js
----------------------------------------------------------------------
diff --git a/bin/update.js b/bin/update.js
index a1a367e..244dcc1 100644
--- a/bin/update.js
+++ b/bin/update.js
@@ -137,26 +137,20 @@ function downloadCommonsCodec() {
 }
 
 var args = WScript.Arguments, PROJECT_PATH="example", 
-    PACKAGE="org.apache.cordova.example", ACTIVITY="cordovaExample",
     shell=WScript.CreateObject("WScript.Shell");
     
 // working dir
-var ROOT = WScript.ScriptFullName.split('\\bin\\create.js').join('');
+var ROOT = WScript.ScriptFullName.split('\\bin\\update.js').join('');
 
-if (args.Count() == 3) {
+if (args.Count() == 1) {
     PROJECT_PATH=args(0);
-    PACKAGE=args(1);
-    ACTIVITY=args(2);
 }
 
-if(fso.FolderExists(PROJECT_PATH)) {
-    WScript.Echo("Project already exists!");
+if(!fso.FolderExists(PROJECT_PATH)) {
+    WScript.Echo("Project doesn't exist!");
     WScript.Quit(1);
 }
 
-var PACKAGE_AS_PATH=PACKAGE.replace(/\./g, '\\');
-var ACTIVITY_PATH=PROJECT_PATH+'\\src\\'+PACKAGE_AS_PATH+'\\'+ACTIVITY+'.java';
-var MANIFEST_PATH=PROJECT_PATH+'\\AndroidManifest.xml';
 var TARGET=setTarget();
 var API_LEVEL=setApiLevel();
 var VERSION=read(ROOT+'\\VERSION').replace(/\r\n/,'').replace(/\n/,'');
@@ -177,16 +171,12 @@ WScript.Echo("Copying js, jar & config.xml files...");
 if(fso.FolderExists(ROOT + '\\framework')) {
     exec('%comspec% /c copy "'+ROOT+'"\\framework\\assets\\www\\cordova-'+VERSION+'.js '+PROJECT_PATH+'\\assets\\www\\cordova-'+VERSION+'.js /Y');
     exec('%comspec% /c copy "'+ROOT+'"\\framework\\cordova-'+VERSION+'.jar '+PROJECT_PATH+'\\libs\\cordova-'+VERSION+'.jar /Y');
-    fso.CreateFolder(PROJECT_PATH + '\\res\\xml');
-    exec('%comspec% /c copy "'+ROOT+'"\\framework\\res\\xml\\config.xml ' + PROJECT_PATH + '\\res\\xml\\config.xml /Y');
 } else {
     // copy in cordova.js
     exec('%comspec% /c copy "'+ROOT+'"\\cordova-'+VERSION+'.js '+PROJECT_PATH+'\\assets\\www\\cordova-'+VERSION+'.js /Y');
     // copy in cordova.jar
     exec('%comspec% /c copy "'+ROOT+'"\\cordova-'+VERSION+'.jar '+PROJECT_PATH+'\\libs\\cordova-'+VERSION+'.jar /Y');
     // copy in xml
-    fso.CreateFolder(PROJECT_PATH + '\\res\\xml');
-    exec('%comspec% /c copy "'+ROOT+'"\\xml\\config.xml ' + PROJECT_PATH + '\\res\\xml\\config.xml /Y');
 }
 
 // update cordova scripts