From 052c99c9db55d51871d52d807ddc6d9e98f49b50 Mon Sep 17 00:00:00 2001 From: ehouse Date: Mon, 4 Jan 2010 05:50:12 +0000 Subject: [PATCH] remove symlinks if they're not back to us -- so that more than one copy of the tree can be active. --- xwords4/android/scripts/ndkbuild.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xwords4/android/scripts/ndkbuild.sh b/xwords4/android/scripts/ndkbuild.sh index 7929b433b..5c4da980f 100755 --- a/xwords4/android/scripts/ndkbuild.sh +++ b/xwords4/android/scripts/ndkbuild.sh @@ -18,11 +18,17 @@ fi cd $(dirname $0) cd ../ +if [ -h $NDK_ROOT/sources/$APP -a $(readlink $NDK_ROOT/sources/$APP) != $(pwd) ]; then + rm $NDK_ROOT/sources/$APP +fi if [ ! -h $NDK_ROOT/sources/$APP ]; then echo "adding symlink to sources" ln -sf $(pwd) $NDK_ROOT/sources/$APP fi +if [ -h $NDK_ROOT/apps/$APP -a $(readlink $NDK_ROOT/apps/$APP) != $(pwd) ]; then + rm $NDK_ROOT/apps/$APP +fi if [ ! -h $NDK_ROOT/apps/$APP ]; then echo "adding symlink to apps" ln -sf $(pwd) $NDK_ROOT/apps/$APP