Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: platform_tools/android/bin/android_install_apk

Issue 266373005: Fix android_install_apk script to work with changes from a137675 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # android_install_skia: installs the skia apk on the device. 3 # android_install_skia: installs the skia apk on the device.
4 4
5 function print_usage { 5 function print_usage {
6 echo "USAGE: android_install_skia [options]" 6 echo "USAGE: android_install_skia [options]"
7 echo " Options: -f Forces the package to be installed by removing any " 7 echo " Options: -f Forces the package to be installed by removing any "
8 echo " previously installed packages" 8 echo " previously installed packages"
9 echo " -h Prints this help message" 9 echo " -h Prints this help message"
10 echo " --release Install the release build of Skia" 10 echo " --release Install the release build of Skia"
11 echo " -s [device_s/n] Serial number of the device to be used" 11 echo " -s [device_s/n] Serial number of the device to be used"
12 } 12 }
13 13
14 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 14 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
15 15
16 source $SCRIPT_DIR/android_setup.sh 16 source $SCRIPT_DIR/android_setup.sh
17 source $SCRIPT_DIR/utils/setup_adb.sh 17 source $SCRIPT_DIR/utils/setup_adb.sh
18 18
19 forceRemoval="false" 19 forceRemoval="false"
20 installLauncher="false" 20 installLauncher="false"
21 installOptions="-r" 21 installOptions="-r"
22 configuration="Debug"
23 22
24 for arg in ${APP_ARGS[@]} 23 for arg in ${APP_ARGS[@]}
25 do 24 do
26 if [[ "${arg}" == "-f" ]]; 25 if [[ "${arg}" == "-f" ]];
27 then 26 then
28 forceRemoval="true" 27 forceRemoval="true"
29 elif [[ "${arg}" == "-h" ]]; 28 elif [[ "${arg}" == "-h" ]];
30 then 29 then
31 print_usage 30 print_usage
32 exit 31 exit
33 elif [[ "${arg}" == "-r" ]]; 32 elif [[ "${arg}" == "-r" ]];
mtklein 2014/05/06 17:58:06 Anyone using -r? Clean this up while we're at it?
34 then 33 then
35 echo "DEPRECATED: -r is now a no-op" 34 echo "DEPRECATED: -r is now a no-op"
36 elif [[ "${arg}" == "--release" ]];
37 then
38 configuration="Release"
39 else 35 else
40 echo "ERROR: unrecognized option ${arg}" 36 echo "ERROR: unrecognized option ${arg}"
41 print_usage 37 print_usage
42 exit 1; 38 exit 1;
43 fi 39 fi
44 done 40 done
45 41
46 if [[ "$forceRemoval" == "true" ]]; 42 if [[ "$forceRemoval" == "true" ]];
47 then 43 then
48 echo "Forcing removal of previously installed packages" 44 echo "Forcing removal of previously installed packages"
49 $ADB ${DEVICE_SERIAL} uninstall com.skia > /dev/null 45 $ADB ${DEVICE_SERIAL} uninstall com.skia > /dev/null
50 fi 46 fi
51 47
52 echo "Installing Skia App from ${SKIA_OUT}/${configuration}" 48 echo "Installing Skia App from ${SKIA_OUT}/${BUILDTYPE}"
53 $ADB ${DEVICE_SERIAL} install ${installOptions} ${SKIA_OUT}/${configuration}/and roid/bin/SkiaAndroid.apk 49 $ADB ${DEVICE_SERIAL} install ${installOptions} ${SKIA_OUT}/${BUILDTYPE}/android /bin/SkiaAndroid.apk
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698