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

Side by Side Diff: tools_webrtc/android/adb_shell.sh

Issue 2864213004: Rename tools-webrtc -> tools_webrtc (Closed)
Patch Set: REmove symlink Created 3 years, 7 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 | « tools_webrtc/android/AndroidManifest.xml ('k') | tools_webrtc/android/build_aar.py » ('j') | 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 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 3 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license 5 # Use of this source code is governed by a BSD-style license
6 # that can be found in the LICENSE file in the root of the source 6 # that can be found in the LICENSE file in the root of the source
7 # tree. An additional intellectual property rights grant can be found 7 # tree. An additional intellectual property rights grant can be found
8 # in the file PATENTS. All contributing project authors may 8 # in the file PATENTS. All contributing project authors may
9 # be found in the AUTHORS file in the root of the source tree. 9 # be found in the AUTHORS file in the root of the source tree.
10 10
11 # 'adb shell' always returns "0" regardless of executable return code. 11 # 'adb shell' always returns "0" regardless of executable return code.
12 # This handy script will return executable return code to shell which 12 # This handy script will return executable return code to shell which
13 # can be used by buildbots. 13 # can be used by buildbots.
14 14
15 adb_shell () { 15 adb_shell () {
16 local RET ADB_LOG 16 local RET ADB_LOG
17 ADB_LOG=$(mktemp "${TMPDIR:-/tmp}/adb-XXXXXXXX") 17 ADB_LOG=$(mktemp "${TMPDIR:-/tmp}/adb-XXXXXXXX")
18 adb "$1" "$2" shell "$3" "$4" ";" echo \$? | tee "$ADB_LOG" 18 adb "$1" "$2" shell "$3" "$4" ";" echo \$? | tee "$ADB_LOG"
19 sed -i -e 's![[:cntrl:]]!!g' "$ADB_LOG" # Remove \r. 19 sed -i -e 's![[:cntrl:]]!!g' "$ADB_LOG" # Remove \r.
20 RET=$(sed -e '$!d' "$ADB_LOG") # Last line contains status code. 20 RET=$(sed -e '$!d' "$ADB_LOG") # Last line contains status code.
21 rm -f "$ADB_LOG" 21 rm -f "$ADB_LOG"
22 return $RET 22 return $RET
23 } 23 }
OLDNEW
« no previous file with comments | « tools_webrtc/android/AndroidManifest.xml ('k') | tools_webrtc/android/build_aar.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698