michael@0: #!/bin/bash michael@0: # michael@0: # Copyright (c) 2012 The Chromium Authors. All rights reserved. michael@0: # Use of this source code is governed by a BSD-style license that can be michael@0: # found in the LICENSE file. michael@0: # michael@0: # Kill a running content shell. michael@0: # michael@0: # Assumes you have sourced the build/android/envsetup.sh script. michael@0: michael@0: SHELL_PID_LINES=$(adb shell ps | grep ' org.chromium.content_shell') michael@0: VAL=$(echo "$SHELL_PID_LINES" | wc -l) michael@0: if [ $VAL -lt 1 ] ; then michael@0: echo "Not running Content shell." michael@0: else michael@0: SHELL_PID=$(echo $SHELL_PID_LINES | awk '{print $2}') michael@0: if [ "$SHELL_PID" != "" ] ; then michael@0: set -x michael@0: adb shell kill $SHELL_PID michael@0: set - michael@0: else michael@0: echo "Content shell does not appear to be running." michael@0: fi michael@0: fi