Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Fail-fast if anything in the script fails. | |
| 4 set -e | |
| 5 | |
| 6 # Remove any existing .android_config file before running android_setup. If we | 3 # Remove any existing .android_config file before running android_setup. If we |
| 7 # did not remove this now then we would build for whatever device type was | 4 # did not remove this now then we would build for whatever device type was |
| 8 # listed in the .android_config instead of the default device type. | 5 # listed in the .android_config instead of the default device type. |
| 9 rm -f .android_config | 6 rm -f .android_config |
| 10 | 7 |
| 11 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | 8 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
| 12 source $SCRIPT_DIR/android_setup.sh | 9 source $SCRIPT_DIR/android_setup.sh |
| 13 | 10 |
|
djsollen
2014/04/03 15:02:52
I think having set -e after line 9 is a good idea.
epoger
2014/04/03 15:06:01
Done.
| |
| 14 if [ $(basename $0) = "android_make" ]; then | 11 GYP_GENERATORS=ninja-android ./gyp_skia |
| 15 GYP_GENERATORS=make-android make ${APP_ARGS[@]} | 12 OUT=$SKIA_OUT/${BUILDTYPE-Debug} # Defaults to Debug if BUILDTYPE isn't set. |
| 16 else | 13 ninja -C $OUT ${APP_ARGS[@]} |
| 17 GYP_GENERATORS=ninja-android ./gyp_skia | 14 ln -sf lib $OUT/lib.target # android_run_skia looks in lib.target; ninja writes to lib. |
| 18 OUT=$SKIA_OUT/${BUILDTYPE-Debug} # Defaults to Debug if BUILDTYPE isn't se t. | 15 # TODO(mtklein): change android_run_skia |
| 19 ninja -C $OUT ${APP_ARGS[@]} | |
| 20 ln -sf lib $OUT/lib.target # android_run_skia looks in lib.target; n inja writes to lib. | |
| 21 fi | |
| 22 | 16 |
| 23 # Write the device id into the .android_config file. This tells | 17 # Write the device id into the .android_config file. This tells |
| 24 # android_run_skia the last build we completed. | 18 # android_run_skia the last build we completed. |
| 25 echo $DEVICE_ID > .android_config | 19 echo $DEVICE_ID > .android_config |
| 26 | 20 |
| OLD | NEW |