Index: platform_tools/android/bin/android_install_apk |
diff --git a/platform_tools/android/bin/android_install_apk b/platform_tools/android/bin/android_install_apk |
index 039acbb6d142954f3a6d22d7949bbb7a6f86cfc1..0b1561335e8d089a044cb3b01187a3cb1ee2289d 100755 |
--- a/platform_tools/android/bin/android_install_apk |
+++ b/platform_tools/android/bin/android_install_apk |
@@ -21,28 +21,26 @@ installLauncher="false" |
installOptions="-r" |
configuration="Debug" |
-while (( "$#" )); do |
- |
- if [[ "$1" == "-f" ]]; |
+for arg in ${APP_ARGS[@]} |
+do |
+ if [[ "${arg}" == "-f" ]]; |
then |
forceRemoval="true" |
- elif [[ "$1" == "-h" ]]; |
+ elif [[ "${arg}" == "-h" ]]; |
then |
print_usage |
exit |
- elif [[ "$1" == "-r" ]]; |
+ elif [[ "${arg}" == "-r" ]]; |
then |
echo "DEPRECATED: -r is now a no-op" |
- elif [[ "$1" == "--release" ]]; |
- then |
+ elif [[ "${arg}" == "--release" ]]; |
+ then |
configuration="Release" |
else |
- echo "ERROR: unrecognized option $1" |
+ echo "ERROR: unrecognized option ${arg}" |
print_usage |
exit 1; |
fi |
- |
-shift |
done |
if [[ "$forceRemoval" == "true" ]]; |