blob: 5f287f0826642b4c61fbd1c319a01ee8e09d7f75 [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +01001#!/bin/bash
2#
3# Copyright 2015 The Chromium Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6#
7# Kill a running android webview shell.
8#
9# Assumes you have sourced the build/android/envsetup.sh script.
10
11SHELL_PID_LINES=$(adb shell ps | grep ' org.chromium.android_webview.shell')
12VAL=$(echo "$SHELL_PID_LINES" | wc -l)
13if [ $VAL -lt 1 ] ; then
14 echo "Not running android webview shell."
15else
16 SHELL_PID=$(echo $SHELL_PID_LINES | awk '{print $2}')
17 if [ "$SHELL_PID" != "" ] ; then
18 set -x
19 adb shell kill $SHELL_PID
20 set -
21 else
22 echo "Android webview shell does not appear to be running."
23 fi
24fi