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 the setup. | |
6 if [ -f .android_config ] | |
7 then | |
8 rm .android_config | |
9 fi | |
borenet
2013/08/19 20:30:50
I'm confused - why do we want to remove this?
djsollen
2013/08/19 20:55:04
We need to remove it or android_setup will default
| |
10 | |
11 # run the config to setup the toolchain and target_device | |
4 source $SCRIPT_DIR/android_setup.sh | 12 source $SCRIPT_DIR/android_setup.sh |
5 | 13 |
14 # write the out directory into the .android_config file | |
15 echo $DEVICE_ID > .android_config | |
16 | |
6 for arg in ${APP_ARGS[@]} | 17 for arg in ${APP_ARGS[@]} |
7 do | 18 do |
8 if [[ "${arg}" == "--use-ccache" ]]; | 19 if [[ "${arg}" == "--use-ccache" ]]; |
9 then | 20 then |
10 if [[ -z "$ANDROID_MAKE_CCACHE" ]]; | 21 if [[ -z "$ANDROID_MAKE_CCACHE" ]]; |
11 then | 22 then |
12 ANDROID_MAKE_CCACHE=$(which ccache) | 23 ANDROID_MAKE_CCACHE=$(which ccache) |
13 fi | 24 fi |
14 else | 25 else |
15 makeVars=("${makeVars[@]}" "${arg}") | 26 makeVars=("${makeVars[@]}" "${arg}") |
16 fi | 27 fi |
17 | 28 |
18 shift | 29 shift |
19 done | 30 done |
20 | 31 |
21 if [[ -n "$ANDROID_MAKE_CCACHE" ]]; then | 32 if [[ -n "$ANDROID_MAKE_CCACHE" ]]; then |
22 $ANDROID_MAKE_CCACHE --version &> /dev/null | 33 $ANDROID_MAKE_CCACHE --version &> /dev/null |
23 if [[ "$?" != "0" ]]; then | 34 if [[ "$?" != "0" ]]; then |
24 echo "Unable to find ccache!" | 35 echo "Unable to find ccache!" |
25 exit 1 | 36 exit 1 |
26 fi | 37 fi |
27 fi | 38 fi |
28 | 39 |
29 # write the out directory into the .android_config file | |
30 echo $SKIA_OUT > .android_config | |
31 | |
32 make ${makeVars[@]} | 40 make ${makeVars[@]} |
33 if [ $? != 0 ] | 41 if [ $? != 0 ] |
34 then | 42 then |
35 exit 1; | 43 exit 1; |
36 fi | 44 fi |
OLD | NEW |