chiark / gitweb /
buildserver: do not set NDK env vars, they are handled by `fdroid build`
[fdroidserver.git] / buildserver / provision-android-ndk
index 80411b3498f83cabfeef2c6eff318fb91a5c95ec..9d4a54c0ba2fb32ee75ccb577f3f9e5e74598cdc 100644 (file)
@@ -3,15 +3,12 @@
 
 set -e
 
-if [ -z $ANDROID_NDK_HOME ]; then
-    echo "ANDROID_NDK_HOME env var must be set!"
-    exit 1
-fi
+NDK_BASE=$1
 
-test -e $ANDROID_NDK_HOME || mkdir -p $ANDROID_NDK_HOME
-cd $ANDROID_NDK_HOME
+test -e $NDK_BASE || mkdir -p $NDK_BASE
+cd $NDK_BASE
 
-if [ ! -e $ANDROID_NDK_HOME/r9b ]; then
+if [ ! -e $NDK_BASE/r9b ]; then
     if [ `uname -m` == 'x86_64' ] ; then
         SUFFIX='_64'
     else
@@ -22,7 +19,7 @@ if [ ! -e $ANDROID_NDK_HOME/r9b ]; then
     mv android-ndk-r9b r9b
 fi
 
-if [ ! -e $ANDROID_NDK_HOME/r10e ]; then
+if [ ! -e $NDK_BASE/r10e ]; then
     if [ `uname -m` == 'x86_64' ] ; then
        SUFFIX='_64'
     else
@@ -32,5 +29,5 @@ if [ ! -e $ANDROID_NDK_HOME/r10e ]; then
     mv android-ndk-r10e r10e
 fi
 
-chmod -R a+rX $ANDROID_NDK_HOME/
-find $ANDROID_NDK_HOME/ -type f -executable -print0 | xargs -0 chmod a+x
+chmod -R a+rX $NDK_BASE/
+find $NDK_BASE/ -type f -executable -print0 | xargs -0 chmod a+x