diff --git a/xwords4/android/scripts/ndkbuild.sh b/xwords4/android/scripts/ndkbuild.sh index d0f840723..b4ef80783 100755 --- a/xwords4/android/scripts/ndkbuild.sh +++ b/xwords4/android/scripts/ndkbuild.sh @@ -1,6 +1,11 @@ #!/bin/sh -OLDDIR=$(pwd) +set -e -u + +if [ ! -e build.xml ]; then + echo "no build.xml; please run from root of source tree" + exit 1 +fi if [ -z "$NDK_ROOT" ]; then echo -n "NDK_ROOT not set... " @@ -8,9 +13,6 @@ if [ -z "$NDK_ROOT" ]; then exit 1 fi -cd $(dirname $0)/../XWords4 - ${NDK_ROOT}/ndk-build $* -cd $OLDDIR echo "$0 done"