Chromium Code Reviews| Index: platform_tools/android/bin/utils/setup_adb.sh |
| diff --git a/platform_tools/android/bin/utils/setup_adb.sh b/platform_tools/android/bin/utils/setup_adb.sh |
| index cb3311aa641fbf7c1c62cf8b7d8f6fd5ea421111..767027b8cfb3e580686c0ee5a45e03c6237c0ffd 100644 |
| --- a/platform_tools/android/bin/utils/setup_adb.sh |
| +++ b/platform_tools/android/bin/utils/setup_adb.sh |
| @@ -1,5 +1,7 @@ |
| -#!/bin/bash |
| +# Copyright 2015 Google Inc. |
| # |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| UTIL_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
| @@ -24,9 +26,10 @@ elif [ $(uname) == "Darwin" ]; then |
| ADB_REQUIRED="1.0.31 or 1.0.32" |
| fi |
| -# get the version and then truncate it to be just the version numbers |
| +# get the version string as an array, use just the version numbers |
| ADB_VERSION="$($ADB version)" |
| -ADB_VERSION="${ADB_VERSION##* }" |
| +ADB_VERSION=($ADB_VERSION) |
| +ADB_VERSION=${ADB_VERSION[4]} |
|
djsollen
2016/01/13 14:32:04
I think this will break backwards compatibility fo
Kimmo Kinnunen
2016/01/13 15:19:50
The intention is exactly getting the 5th element.
|
| if [[ "$ADB_REQUIRED" != *"$ADB_VERSION"* ]]; then |
| echo "WARNING: Your ADB version is out of date!" |