summaryrefslogtreecommitdiffstats
path: root/media/webrtc/trunk/build/android/adb_kill_content_shell
diff options
context:
space:
mode:
Diffstat (limited to 'media/webrtc/trunk/build/android/adb_kill_content_shell')
-rwxr-xr-xmedia/webrtc/trunk/build/android/adb_kill_content_shell24
1 files changed, 24 insertions, 0 deletions
diff --git a/media/webrtc/trunk/build/android/adb_kill_content_shell b/media/webrtc/trunk/build/android/adb_kill_content_shell
new file mode 100755
index 000000000..d24c7a995
--- /dev/null
+++ b/media/webrtc/trunk/build/android/adb_kill_content_shell
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# Kill a running content shell.
+#
+# Assumes you have sourced the build/android/envsetup.sh script.
+
+SHELL_PID_LINES=$(adb shell ps | grep ' org.chromium.content_shell')
+VAL=$(echo "$SHELL_PID_LINES" | wc -l)
+if [ $VAL -lt 1 ] ; then
+ echo "Not running Content shell."
+else
+ SHELL_PID=$(echo $SHELL_PID_LINES | awk '{print $2}')
+ if [ "$SHELL_PID" != "" ] ; then
+ set -x
+ adb shell kill $SHELL_PID
+ set -
+ else
+ echo "Content shell does not appear to be running."
+ fi
+fi