blob: b6ed35d7e37de02ccd120a9001fbb624c11fcd49 [file] [log] [blame]
Alexander Afanasyev087c7c12015-02-02 00:21:21 -08001#!/usr/bin/env bash
2set -e
3set -x
4
Alexander Afanasyevdbaae952015-02-07 16:29:31 -08005URL=https://www.crystax.net/download/
Alexander Afanasyev92bf1722015-09-04 13:45:00 -07006NDK=crystax-ndk-10.2.1
Alexander Afanasyevdbaae952015-02-07 16:29:31 -08007
8NDK_FILE="$NDK-linux-x86_64.tar.bz2"
9
10if [ ! -f downloads/$NDK_FILE ]; then
Alexander Afanasyev087c7c12015-02-02 00:21:21 -080011 mkdir downloads || true
12 cd downloads
Alexander Afanasyevdbaae952015-02-07 16:29:31 -080013 wget --no-check-certificate $URL$NDK_FILE
Alexander Afanasyev087c7c12015-02-02 00:21:21 -080014 cd ..
15fi
16
Alexander Afanasyevdbaae952015-02-07 16:29:31 -080017if [ ! -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 Afanasyev087c7c12015-02-02 00:21:21 -080022fi
23
Alexander Afanasyevdbaae952015-02-07 16:29:31 -080024echo ndk.dir=`pwd`/$NDK >> local.properties