blob: 5729869a7cef6dd4cd9e0a99a2ea1d3b41e14103 [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/
6NDK=crystax-ndk-10.1.0
7
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