OLD | NEW |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | 3 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
4 | |
5 # remove the existing .android_config file prior to running android_setup. If | |
6 # we did not remove this here then we would build for whatever device type was | |
7 # listed in the .android_config instead of the default device type. | |
borenet
2013/08/19 21:04:22
This behavior is still a little strange to me - in
| |
8 if [ -f .android_config ] | |
9 then | |
10 rm .android_config | |
11 fi | |
12 | |
13 # run the config to setup the environment | |
4 source $SCRIPT_DIR/android_setup.sh | 14 source $SCRIPT_DIR/android_setup.sh |
5 | 15 |
16 # write the device id into the .android_config file | |
17 echo $DEVICE_ID > .android_config | |
18 | |
6 for arg in ${APP_ARGS[@]} | 19 for arg in ${APP_ARGS[@]} |
7 do | 20 do |
8 if [[ "${arg}" == "--use-ccache" ]]; | 21 if [[ "${arg}" == "--use-ccache" ]]; |
9 then | 22 then |
10 if [[ -z "$ANDROID_MAKE_CCACHE" ]]; | 23 if [[ -z "$ANDROID_MAKE_CCACHE" ]]; |
11 then | 24 then |
12 ANDROID_MAKE_CCACHE=$(which ccache) | 25 ANDROID_MAKE_CCACHE=$(which ccache) |
13 fi | 26 fi |
14 else | 27 else |
15 makeVars=("${makeVars[@]}" "${arg}") | 28 makeVars=("${makeVars[@]}" "${arg}") |
16 fi | 29 fi |
17 | 30 |
18 shift | 31 shift |
19 done | 32 done |
20 | 33 |
21 if [[ -n "$ANDROID_MAKE_CCACHE" ]]; then | 34 if [[ -n "$ANDROID_MAKE_CCACHE" ]]; then |
22 $ANDROID_MAKE_CCACHE --version &> /dev/null | 35 $ANDROID_MAKE_CCACHE --version &> /dev/null |
23 if [[ "$?" != "0" ]]; then | 36 if [[ "$?" != "0" ]]; then |
24 echo "Unable to find ccache!" | 37 echo "Unable to find ccache!" |
25 exit 1 | 38 exit 1 |
26 fi | 39 fi |
27 fi | 40 fi |
28 | 41 |
29 # write the out directory into the .android_config file | |
30 echo $SKIA_OUT > .android_config | |
31 | |
32 make ${makeVars[@]} | 42 make ${makeVars[@]} |
33 if [ $? != 0 ] | 43 if [ $? != 0 ] |
34 then | 44 then |
35 exit 1; | 45 exit 1; |
36 fi | 46 fi |
OLD | NEW |