2013-04-29 12:09:31 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# android_kill_skia: kills any skia processes on the device.
|
|
|
|
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
|
|
|
|
source $SCRIPT_DIR/utils/setup_adb.sh
|
|
|
|
|
2013-05-16 18:12:34 +00:00
|
|
|
SERIAL=""
|
|
|
|
|
|
|
|
while (( "$#" )); do
|
|
|
|
|
|
|
|
if [[ "$1" == "-s" ]];
|
|
|
|
then
|
|
|
|
if [[ $# -lt 2 ]];
|
|
|
|
then
|
|
|
|
echo "ERROR: missing serial number"
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
SERIAL="-s $2"
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
2013-04-29 12:09:31 +00:00
|
|
|
if [ $(uname) == "Linux" ]; then
|
2013-05-16 18:12:34 +00:00
|
|
|
$ADB $SERIAL shell ps | grep skia | awk '{print $2}' | xargs -r $ADB $SERIAL shell kill
|
2013-04-29 12:09:31 +00:00
|
|
|
elif [ $(uname) == "Darwin" ]; then
|
2013-05-16 18:12:34 +00:00
|
|
|
$ADB $SERIAL shell ps | grep skia | awk '{print $2}' | xargs $ADB $SERIAL shell kill
|
2013-04-29 12:09:31 +00:00
|
|
|
else
|
|
|
|
echo "Could not automatically determine OS!"
|
|
|
|
exit 1;
|
2013-05-16 18:12:34 +00:00
|
|
|
fi
|