Alexander Afanasyev | 087c7c1 | 2015-02-02 00:21:21 -0800 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -e |
| 3 | set -x |
| 4 | |
Alexander Afanasyev | dbaae95 | 2015-02-07 16:29:31 -0800 | [diff] [blame] | 5 | URL=https://www.crystax.net/download/ |
| 6 | NDK=crystax-ndk-10.1.0 |
| 7 | |
| 8 | NDK_FILE="$NDK-linux-x86_64.tar.bz2" |
| 9 | |
| 10 | if [ ! -f downloads/$NDK_FILE ]; then |
Alexander Afanasyev | 087c7c1 | 2015-02-02 00:21:21 -0800 | [diff] [blame] | 11 | mkdir downloads || true |
| 12 | cd downloads |
Alexander Afanasyev | dbaae95 | 2015-02-07 16:29:31 -0800 | [diff] [blame] | 13 | wget --no-check-certificate $URL$NDK_FILE |
Alexander Afanasyev | 087c7c1 | 2015-02-02 00:21:21 -0800 | [diff] [blame] | 14 | cd .. |
| 15 | fi |
| 16 | |
Alexander Afanasyev | dbaae95 | 2015-02-07 16:29:31 -0800 | [diff] [blame] | 17 | if [ ! -d $NDK ]; then |
| 18 | echo -en 'travis_fold:start:NDK\r' |
| 19 | pv -f downloads/$NDK_FILE | tar xjf - |
| 20 | find $NDK -name byteswap.h -exec sed -i -e 's/ swap/ bswap/g' {} \; |
| 21 | echo -en 'travis_fold:end:NDK\r' |
Alexander Afanasyev | 087c7c1 | 2015-02-02 00:21:21 -0800 | [diff] [blame] | 22 | fi |
| 23 | |
Alexander Afanasyev | dbaae95 | 2015-02-07 16:29:31 -0800 | [diff] [blame] | 24 | echo ndk.dir=`pwd`/$NDK >> local.properties |