From 8590466229de1bf8f326495120ef1c227046aa5d Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 13 Feb 2012 22:15:34 -0800 Subject: [PATCH] stop changing directiories/assuing where it'll be run from --- xwords4/android/scripts/ndkbuild.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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"