Index: platform_tools/android/bin/android_install_app |
diff --git a/platform_tools/android/bin/android_install_app b/platform_tools/android/bin/android_install_app |
index b43b77d69eb29ab934a0cd12cef4005538f3d1a1..95a96f67e04a71ff7f623ec8f9ab13ff9b278af1 100755 |
--- a/platform_tools/android/bin/android_install_app |
+++ b/platform_tools/android/bin/android_install_app |
@@ -9,6 +9,7 @@ function print_usage { |
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" |
+ echo " --app Can be either SampleApp or VisualBench" |
} |
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
@@ -19,19 +20,20 @@ source $SCRIPT_DIR/utils/setup_adb.sh |
forceRemoval="false" |
installLauncher="false" |
installOptions="-r" |
+app="" |
-for arg in ${APP_ARGS[@]} |
-do |
- if [[ "${arg}" == "-f" ]]; |
- then |
+for ((i=0; i < ${#APP_ARGS[@]}; i++)); do |
+ arg=${APP_ARGS[i]} |
+ if [[ "${arg}" == "-f" ]]; then |
forceRemoval="true" |
- elif [[ "${arg}" == "-h" ]]; |
- then |
+ elif [[ "${arg}" == "-h" ]]; then |
print_usage |
exit |
- elif [[ "${arg}" == "-r" ]]; |
- then |
+ elif [[ "${arg}" == "-r" ]]; then |
echo "DEPRECATED: -r is now a no-op" |
+ elif [[ "${arg}" == "--app" ]]; then |
+ let i+=1 |
+ app=${APP_ARGS[i]} |
else |
echo "ERROR: unrecognized option ${arg}" |
djsollen
2015/06/18 16:21:14
what if instead of throwing an error we take treat
|
print_usage |
@@ -45,5 +47,6 @@ then |
$ADB ${DEVICE_SERIAL} uninstall com.skia > /dev/null |
fi |
-echo "Installing Skia App from ${SKIA_OUT}/${BUILDTYPE}" |
-$ADB ${DEVICE_SERIAL} install ${installOptions} ${SKIA_OUT}/${BUILDTYPE}/android/bin/SkiaAndroid.apk |
+echo "Installing ${app} from ${SKIA_OUT}/${BUILDTYPE}" |
+$ADB ${DEVICE_SERIAL} install ${installOptions} ${SKIA_OUT}/${BUILDTYPE}/android/${app}/bin/${app}.apk |
+ |