7507276d86
The android_setup.sh parses command line arguments and stores the ones it does not use to APP_ARGS variable. R=djsollen@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/61553002 git-svn-id: http://skia.googlecode.com/svn/trunk@12153 2bbb7eff-a529-9590-31e7-b0007b416f81
54 lines
1.4 KiB
Bash
Executable File
54 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# android_install_skia: installs the skia apk on the device.
|
|
|
|
function print_usage {
|
|
echo "USAGE: android_install_skia [options]"
|
|
echo " Options: -f Forces the package to be installed by removing any"
|
|
echo " previously installed packages"
|
|
echo " -h Prints this help message"
|
|
echo " --release Install the release build of Skia"
|
|
echo " -s [device_s/n] Serial number of the device to be used"
|
|
}
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
source $SCRIPT_DIR/android_setup.sh
|
|
source $SCRIPT_DIR/utils/setup_adb.sh
|
|
|
|
forceRemoval="false"
|
|
installLauncher="false"
|
|
installOptions="-r"
|
|
configuration="Debug"
|
|
|
|
for arg in ${APP_ARGS[@]}
|
|
do
|
|
if [[ "${arg}" == "-f" ]];
|
|
then
|
|
forceRemoval="true"
|
|
elif [[ "${arg}" == "-h" ]];
|
|
then
|
|
print_usage
|
|
exit
|
|
elif [[ "${arg}" == "-r" ]];
|
|
then
|
|
echo "DEPRECATED: -r is now a no-op"
|
|
elif [[ "${arg}" == "--release" ]];
|
|
then
|
|
configuration="Release"
|
|
else
|
|
echo "ERROR: unrecognized option ${arg}"
|
|
print_usage
|
|
exit 1;
|
|
fi
|
|
done
|
|
|
|
if [[ "$forceRemoval" == "true" ]];
|
|
then
|
|
echo "Forcing removal of previously installed packages"
|
|
$ADB ${DEVICE_SERIAL} uninstall com.skia > /dev/null
|
|
fi
|
|
|
|
echo "Installing Skia App from ${SKIA_OUT}/${configuration}"
|
|
$ADB ${DEVICE_SERIAL} install ${installOptions} ${SKIA_OUT}/${configuration}/android/bin/SkiaAndroid.apk
|