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

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

Issue 1869813002: Add support for pyadb to setup_adb.sh (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 8 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
« 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 # Copyright 2015 Google Inc. 1 # Copyright 2015 Google Inc.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 UTIL_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 UTIL_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
7 7
8 if [ $PYADB ] && [ -a "$PYADB" ]; then
9 echo "Python ADB detected, going to use that"
10 ADB="python ${PYADB}"
11 return
12 fi
13
8 if [ "$(which adb)" != "" ]; then 14 if [ "$(which adb)" != "" ]; then
9 ADB="$(which adb)" 15 ADB="$(which adb)"
10 elif [ -d "$ANDROID_SDK_ROOT" ]; then 16 elif [ -d "$ANDROID_SDK_ROOT" ]; then
11 ADB="${ANDROID_SDK_ROOT}/platform-tools/adb" 17 ADB="${ANDROID_SDK_ROOT}/platform-tools/adb"
12 else 18 else
13 echo $ANDROID_SDK_ROOT 19 echo $ANDROID_SDK_ROOT
14 echo "No ANDROID_SDK_ROOT set (check that android_setup.sh was properly source d)" 20 echo "No ANDROID_SDK_ROOT set (check that android_setup.sh was properly source d)"
15 exit 1 21 exit 1
16 fi 22 fi
17 23
(...skipping 11 matching lines...) Expand all
29 # get the version string as an array, use just the version numbers 35 # get the version string as an array, use just the version numbers
30 ADB_VERSION="$($ADB version)" 36 ADB_VERSION="$($ADB version)"
31 ADB_VERSION=($ADB_VERSION) 37 ADB_VERSION=($ADB_VERSION)
32 ADB_VERSION=${ADB_VERSION[4]} 38 ADB_VERSION=${ADB_VERSION[4]}
33 39
34 if [[ "$ADB_REQUIRED" != *"$ADB_VERSION"* ]]; then 40 if [[ "$ADB_REQUIRED" != *"$ADB_VERSION"* ]]; then
35 echo "WARNING: Your ADB version is out of date!" 41 echo "WARNING: Your ADB version is out of date!"
36 echo " Expected ADB Version: ${ADB_REQUIRED}" 42 echo " Expected ADB Version: ${ADB_REQUIRED}"
37 echo " Actual ADB Version: ${ADB_VERSION}" 43 echo " Actual ADB Version: ${ADB_VERSION}"
38 fi 44 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