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

[2/5] webworks commit: [CB-3830] Check for java on path

[CB-3830] Check for java on path


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

Branch: refs/heads/master
Commit: df6228ee7866b2122ccaf4cd0edd7a86a8ce09b2
Parents: 2684836
Author: Bryan Higgins <bh...@blackberry.com>
Authored: Mon Jun 17 10:16:41 2013 -0400
Committer: jkeshavarzi <jk...@blackberry.com>
Committed: Mon Jun 17 16:20:58 2013 -0400

----------------------------------------------------------------------
 blackberry10/bin/check_reqs     | 14 +++++++++-----
 blackberry10/bin/check_reqs.bat | 22 +++++++++++++++++-----
 2 files changed, 26 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/df6228ee/blackberry10/bin/check_reqs
----------------------------------------------------------------------
diff --git a/blackberry10/bin/check_reqs b/blackberry10/bin/check_reqs
index 4362ccf..a813293 100755
--- a/blackberry10/bin/check_reqs
+++ b/blackberry10/bin/check_reqs
@@ -20,24 +20,28 @@
 
 NODE=$(command -v node)
 NPM=$(command -v npm)
+JAVA=$(command -v java)
 PACKAGER=$(command -v blackberry-nativepackager)
 DEPLOYER=$(command -v blackberry-deploy)
 SIGNER=$(command -v blackberry-signer)
 
 if [ -z "$NODE" ]; then
-    echo "Node cannot be found on the path. Aborting."
+    echo node cannot be found on the path. Aborting.
     EXIT_CODE=1
 elif [ -z "$NPM" ]; then
-    echo "npm cannot be found on the path. Aborting."
+    echo npm cannot be found on the path. Aborting.
+    EXIT_CODE=1
+elif [ -z "$JAVA" ]; then
+    echo java cannot be found on the path. Aborting.
     EXIT_CODE=1
 elif [ -z "$PACKAGER" ]; then
-    echo "blackberry-nativepackager cannot be found on the path. Aborting."
+    echo blackberry-nativepackager cannot be found on the path. Aborting.
     EXIT_CODE=1
 elif [ -z "$DEPLOYER" ]; then
-    echo "blackberry-deploy cannot be found on the path. Aborting."
+    echo blackberry-deploy cannot be found on the path. Aborting.
     EXIT_CODE=1
 elif [ -z "$SIGNER" ]; then
-    echo "blackberry-signer cannot be found on the path. Aborting."
+    echo blackberry-signer cannot be found on the path. Aborting.
     EXIT_CODE=1
 else
     node "$( dirname "$0" )/check_reqs.js" "$@"

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/df6228ee/blackberry10/bin/check_reqs.bat
----------------------------------------------------------------------
diff --git a/blackberry10/bin/check_reqs.bat b/blackberry10/bin/check_reqs.bat
index 0593e19..8dbcbf2 100755
--- a/blackberry10/bin/check_reqs.bat
+++ b/blackberry10/bin/check_reqs.bat
@@ -55,24 +55,36 @@ for %%X in (blackberry-signer) do (
   )
 )
 
+set FOUNDJAVA=
+for %%X in (java) do (
+  if not defined FOUNDJAVA (
+    set FOUNDJAVA=%%~$PATH:X
+  )
+)
+
+
 if not defined FOUNDNODE (
-  echo "npm cannot be found on the path. Aborting."
+  echo npm cannot be found on the path. Aborting.
   exit /b 1
 )
 if not defined FOUNDNPM (
-  echo "Node cannot be found on the path. Aborting."
+  echo node cannot be found on the path. Aborting.
+  exit /b 1
+)
+if not defined FOUNDJAVA (
+  echo java cannot be found on the path. Aborting.
   exit /b 1
 )
 if not defined FOUNDPACKAGER (
-  echo "blackberry-nativepackager cannot be found on the path. Aborting."
+  echo blackberry-nativepackager cannot be found on the path. Aborting.
   exit /b 1
 )
 if not defined FOUNDDEPLOYER (
-  echo "blackberry-deploy cannot be found on the path. Aborting."
+  echo blackberry-deploy cannot be found on the path. Aborting.
   exit /b 1
 )
 if not defined FOUNDSIGNER (
-  echo "blackberry-signer cannot be found on the path. Aborting."
+  echo blackberry-signer cannot be found on the path. Aborting.
   exit /b 1
 )