a61ba109bf
R=borenet@google.com Review URL: https://codereview.chromium.org/22929006 git-svn-id: http://skia.googlecode.com/svn/trunk@10807 2bbb7eff-a529-9590-31e7-b0007b416f81
47 lines
986 B
Bash
Executable File
47 lines
986 B
Bash
Executable File
#!/bin/bash
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
# remove the existing .android_config file prior to running android_setup. If
|
|
# we did not remove this here then we would build for whatever device type was
|
|
# listed in the .android_config instead of the default device type.
|
|
if [ -f .android_config ]
|
|
then
|
|
rm .android_config
|
|
fi
|
|
|
|
# run the config to setup the environment
|
|
source $SCRIPT_DIR/android_setup.sh
|
|
|
|
# write the device id into the .android_config file
|
|
echo $DEVICE_ID > .android_config
|
|
|
|
for arg in ${APP_ARGS[@]}
|
|
do
|
|
if [[ "${arg}" == "--use-ccache" ]];
|
|
then
|
|
if [[ -z "$ANDROID_MAKE_CCACHE" ]];
|
|
then
|
|
ANDROID_MAKE_CCACHE=$(which ccache)
|
|
fi
|
|
else
|
|
makeVars=("${makeVars[@]}" "${arg}")
|
|
fi
|
|
|
|
shift
|
|
done
|
|
|
|
if [[ -n "$ANDROID_MAKE_CCACHE" ]]; then
|
|
$ANDROID_MAKE_CCACHE --version &> /dev/null
|
|
if [[ "$?" != "0" ]]; then
|
|
echo "Unable to find ccache!"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
make ${makeVars[@]}
|
|
if [ $? != 0 ]
|
|
then
|
|
exit 1;
|
|
fi
|