cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [1/2] android commit: [CB-2788] added bash check-reqs script
Date Mon, 22 Apr 2013 21:55:27 GMT
Updated Branches:
  refs/heads/master 71402b658 -> a03df3fad


[CB-2788] added bash check-reqs script


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

Branch: refs/heads/master
Commit: 86cd20dcc31d5dd811f029a1424c7850f1a1ce5c
Parents: 4dee30e
Author: Benn Mapes <benn.mapes@gmail.com>
Authored: Fri Apr 19 11:33:34 2013 -0700
Committer: Benn Mapes <benn.mapes@gmail.com>
Committed: Fri Apr 19 11:39:48 2013 -0700

----------------------------------------------------------------------
 bin/check_reqs |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/86cd20dc/bin/check_reqs
----------------------------------------------------------------------
diff --git a/bin/check_reqs b/bin/check_reqs
new file mode 100755
index 0000000..0032778
--- /dev/null
+++ b/bin/check_reqs
@@ -0,0 +1,34 @@
+#! /bin/bash
+#       Licensed to the Apache Software Foundation (ASF) under one
+#       or more contributor license agreements.  See the NOTICE file
+#       distributed with this work for additional information
+#       regarding copyright ownership.  The ASF licenses this file
+#       to you under the Apache License, Version 2.0 (the
+#       "License"); you may not use this file except in compliance
+#       with the License.  You may obtain a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#       Unless required by applicable law or agreed to in writing,
+#       software distributed under the License is distributed on an
+#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#       KIND, either express or implied.  See the License for the
+#       specific language governing permissions and limitations
+#       under the License.
+#
+ROOT="$( cd "$( dirname "$0" )/.." && pwd )"
+cmd=`android list target`
+if [[ $? != 0 ]]; then
+    echo "The command `android` failed. Make sure you have the latest Android SDK installed,
and the `android` command (inside the tools/ folder) added to your path."
+    exit 2
+elif [[ ! $cmd =~ "android-17" ]]; then
+    echo "Please install Android target 17 (the Android 4.2 SDK). Make sure you have the
latest Android tools installed as well. Run `android` from your command-line to install/update
any missing SDKs or tools."
+    exit 2
+else
+    cmd="android update project -p $ROOT -t android-17 1> /dev/null 2>&1"
+    eval $cmd
+    if [[ $? != 0 ]]; then
+        echo "Error updating the Cordova library to work with your Android environment."
+        exit 2
+    fi
+fi
\ No newline at end of file


Mime
View raw message