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

Side by Side Diff: platform_tools/android/bin/utils/setup_adb.sh

Issue 692513003: Use the most recent version of ADB from the SDK if necessary. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: keep adb Created 6 years, 1 month 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
« 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 3
4 UTIL_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 UTIL_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5 5
6 if [ "$(which adb)" != "" ]; then 6 if [ "$(which adb)" != "" ]; then
7 ADB="$(which adb)" 7 ADB="$(which adb)"
8 elif [ $(uname) == "Linux" ]; then 8 elif [ -d "$ANDROID_SDK_ROOT" ]; then
9 ADB=$UTIL_DIR/../linux/adb 9 ADB="${ANDROID_SDK_ROOT}/platform-tools/adb"
10 elif [ $(uname) == "Darwin" ]; then
11 ADB=$UTIL_DIR/../mac/adb
12 else 10 else
13 echo "ERROR: Could not find ADB!" 11 echo $ANDROID_SDK_ROOT
14 exit 1; 12 echo "No ANDROID_SDK_ROOT set (check that android_setup.sh was properly source d)"
13 exit 1
15 fi 14 fi
16 15
17 #echo "ADB is: $ADB" 16 if [ ! -x $ADB ]; then
17 echo "The adb binary is not executable"
18 exit 1
19 fi
20
21 if [ $(uname) == "Linux" ]; then
22 ADB_REQUIRED="1.0.32"
23 elif [ $(uname) == "Darwin" ]; then
24 ADB_REQUIRED="1.0.31"
25 fi
26
27 # get the version and then truncate it to be just the version numbers
28 ADB_VERSION="$($ADB version)"
29 ADB_VERSION="${ADB_VERSION##* }"
30
31 if [ $ADB_VERSION != $ADB_REQUIRED ]; then
32 echo "WARNING: Your ADB version is out of date!"
33 echo " Expected ADB Version: ${ADB_REQUIRED}"
34 echo " Actual ADB Version: ${ADB_VERSION}"
35 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