xwords/xwords4/android/scripts/ndkbuild.sh
Eric House e00938aeb1 fix to use ANDROID_NDK instead of NDK_ROOT, following fdroid's
convention, but also not to require either if ndk-build is on PATH.
2015-04-07 07:07:24 -07:00

24 lines
440 B
Bash
Executable file

#!/bin/sh
set -e -u
ANDROID_NDK=${ANDROID_NDK:-''}
if [ ! -e build.xml ]; then
echo "no build.xml; please run from root of source tree"
exit 1
fi
if [ -z "$ANDROID_NDK" ]; then
if which ndk-build >/dev/null; then
ANDROID_NDK=$(dirname $(which ndk-build))
else
echo -n "ANDROID_NDK not set... "
echo "NDK not found; install and set ANDROID_NDK to point to it"
exit 1
fi
fi
${ANDROID_NDK}/ndk-build $*
echo "$0 done"