Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: platform_tools/android/bin/android_setup.sh

Issue 148793003: fix script so that the error is actually printed if ant is not installed (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # android_setup.sh: Sets environment variables used by other Android scripts. 3 # android_setup.sh: Sets environment variables used by other Android scripts.
4 4
5 # Parse the arguments for a DEVICE_ID. 5 # Parse the arguments for a DEVICE_ID.
6 DEVICE_ID="" 6 DEVICE_ID=""
7 DEVICE_SERIAL="" 7 DEVICE_SERIAL=""
8 while (( "$#" )); do 8 while (( "$#" )); do
9 if [[ $(echo "$1" | grep "^-d$") != "" ]]; 9 if [[ $(echo "$1" | grep "^-d$") != "" ]];
10 then 10 then
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 if [ -z "$ANDROID_TOOL" ]; then 47 if [ -z "$ANDROID_TOOL" ]; then
48 echo "ERROR: Please define ANDROID_SDK_ROOT in your environment to point" 48 echo "ERROR: Please define ANDROID_SDK_ROOT in your environment to point"
49 echo " to a valid Android SDK installation." 49 echo " to a valid Android SDK installation."
50 exit 1 50 exit 1
51 fi 51 fi
52 ANDROID_SDK_ROOT=$(cd $(dirname "$ANDROID_TOOL")/.. && pwd) 52 ANDROID_SDK_ROOT=$(cd $(dirname "$ANDROID_TOOL")/.. && pwd)
53 exportVar ANDROID_SDK_ROOT "$ANDROID_SDK_ROOT" 53 exportVar ANDROID_SDK_ROOT "$ANDROID_SDK_ROOT"
54 fi 54 fi
55 55
56 # ant is required to be installed on your system and in your PATH 56 # ant is required to be installed on your system and in your PATH
57 ant -version &> /dev/null 57 which ant &> /dev/null
58 if [[ "$?" != "0" ]]; then 58 if [[ "$?" != "0" ]]; then
59 echo "ERROR: Unable to find ant. Please install it before proceeding." 59 echo "ERROR: Unable to find ant. Please install it before proceeding."
60 exit 1 60 exit 1
61 fi 61 fi
62 62
63 # check to see that gclient sync ran successfully 63 # check to see that gclient sync ran successfully
64 THIRD_PARTY_EXTERNAL_DIR=${SCRIPT_DIR}/../third_party/externals 64 THIRD_PARTY_EXTERNAL_DIR=${SCRIPT_DIR}/../third_party/externals
65 if [ ! -d "$THIRD_PARTY_EXTERNAL_DIR" ]; then 65 if [ ! -d "$THIRD_PARTY_EXTERNAL_DIR" ]; then
66 echo "" 66 echo ""
67 echo "ERROR: Unable to find the required third_party dependencies needed to build." 67 echo "ERROR: Unable to find the required third_party dependencies needed to build."
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 else 330 else
331 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST 331 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST
332 fi 332 fi
333 } 333 }
334 334
335 # Set up the device. 335 # Set up the device.
336 setup_device "${DEVICE_ID}" 336 setup_device "${DEVICE_ID}"
337 if [[ "$?" != "0" ]]; then 337 if [[ "$?" != "0" ]]; then
338 exit 1 338 exit 1
339 fi 339 fi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698