| # Copyright 2015 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 instance of ChromePublic. |
| # Assumes you have sourced the build/android/envsetup.sh script. |
| SHELL_PID_LINES=$(adb shell ps | grep -w 'org.chromium.chrome') |
| VAL=$(echo "$SHELL_PID_LINES" | wc -l) |
| echo "Not running ChromePublic." |
| SHELL_PID=$(echo $SHELL_PID_LINES | awk '{print $2}') |
| if [ "$SHELL_PID" != "" ] ; then |
| adb shell kill $SHELL_PID |
| echo "ChromePublic does not appear to be running." |