1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-15 03:20:10 +01:00
fdroidserver/buildserver/provision-android-ndk
Hans-Christoph Steiner 226237c5f7 buildserver: do not set NDK env vars, they are handled by fdroid build
`fdroid build` handles setting the NDK env vars since the NDK version can
change depending on the app being build.  Unlike ANDROID_HOME, there is no
single global NDK location.  The NDK installs are all versioned.
2016-06-21 10:29:56 +02:00

34 lines
728 B
Bash

#!/bin/bash
#
set -e
NDK_BASE=$1
test -e $NDK_BASE || mkdir -p $NDK_BASE
cd $NDK_BASE
if [ ! -e $NDK_BASE/r9b ]; then
if [ `uname -m` == 'x86_64' ] ; then
SUFFIX='_64'
else
SUFFIX=''
fi
tar xjf /vagrant/cache/android-ndk-r9b-linux-x86$SUFFIX.tar.bz2
tar xjf /vagrant/cache/android-ndk-r9b-linux-x86$SUFFIX-legacy-toolchains.tar.bz2
mv android-ndk-r9b r9b
fi
if [ ! -e $NDK_BASE/r10e ]; then
if [ `uname -m` == 'x86_64' ] ; then
SUFFIX='_64'
else
SUFFIX=''
fi
7zr x /vagrant/cache/android-ndk-r10e-linux-x86$SUFFIX.bin > /dev/null
mv android-ndk-r10e r10e
fi
chmod -R a+rX $NDK_BASE/
find $NDK_BASE/ -type f -executable -print0 | xargs -0 chmod a+x