2013-04-29 12:09:31 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2014-04-04 16:26:42 +00:00
|
|
|
# Fail-fast if anything in the script fails.
|
|
|
|
set -e
|
|
|
|
|
2013-09-30 17:32:09 +00:00
|
|
|
# Remove any existing .android_config file before running android_setup. If we
|
|
|
|
# did not remove this now then we would build for whatever device type was
|
2013-08-20 12:22:57 +00:00
|
|
|
# listed in the .android_config instead of the default device type.
|
2013-09-30 17:32:09 +00:00
|
|
|
rm -f .android_config
|
2013-04-29 12:09:31 +00:00
|
|
|
|
2014-04-04 16:26:42 +00:00
|
|
|
SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
|
2013-09-30 17:22:48 +00:00
|
|
|
source $SCRIPT_DIR/android_setup.sh
|
|
|
|
|
2014-05-06 18:31:09 +00:00
|
|
|
SKIA_SRC_DIR=$(cd "${SCRIPT_DIR}/../../.."; pwd)
|
|
|
|
GYP_GENERATORS=ninja-android "${SKIA_SRC_DIR}/gyp_skia"
|
2014-04-04 16:26:42 +00:00
|
|
|
ninja -C $SKIA_OUT/$BUILDTYPE ${APP_ARGS[@]}
|
2013-09-30 17:22:48 +00:00
|
|
|
|
2013-09-30 17:32:09 +00:00
|
|
|
# Write the device id into the .android_config file. This tells
|
|
|
|
# android_run_skia the last build we completed.
|
|
|
|
echo $DEVICE_ID > .android_config
|
|
|
|
|