diff options
author | TheBeastOfCaerbannog <catharsis@post.cz> | 2017-03-21 12:02:26 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-03-21 22:52:55 -0700 |
commit | 757c90e53c64ec8605f8471ae1b7672de23da61e (patch) | |
tree | 7546836fcf9165f5ff0690cbbb122e8e326b048c /android-configure | |
parent | eed87b1637d64340856bb7f77db899f5283ca84f (diff) | |
download | android-node-v8-757c90e53c64ec8605f8471ae1b7672de23da61e.tar.gz android-node-v8-757c90e53c64ec8605f8471ae1b7672de23da61e.tar.bz2 android-node-v8-757c90e53c64ec8605f8471ae1b7672de23da61e.zip |
build: don't create directory for NDK toolchain
Let make-standalone-toolchain.sh create directory.
PR-URL: https://github.com/nodejs/node/pull/11916
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'android-configure')
-rwxr-xr-x | android-configure | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/android-configure b/android-configure index 1dc238ebd0..59f0a40c1a 100755 --- a/android-configure +++ b/android-configure @@ -38,13 +38,26 @@ case $ARCH in ;; esac +NDK_PATH=$1 +function make_toolchain { + $NDK_PATH/build/tools/make-standalone-toolchain.sh \ + --toolchain=$TOOLCHAIN_NAME-$CC_VER \ + --arch=$ARCH \ + --install-dir=$TOOLCHAIN \ + --platform=android-21 +} + export TOOLCHAIN=$PWD/android-toolchain -mkdir -p $TOOLCHAIN -$1/build/tools/make-standalone-toolchain.sh \ - --toolchain=$TOOLCHAIN_NAME-$CC_VER \ - --arch=$ARCH \ - --install-dir=$TOOLCHAIN \ - --platform=android-21 +if [ -d "$TOOLCHAIN" ]; then + read -r -p "NDK toolchain already exists. Replace it? [y/N]" response + case "$response" in + [Yy]) + rm -rf "$TOOLCHAIN" + make_toolchain + esac +else + make_toolchain +fi export PATH=$TOOLCHAIN/bin:$PATH export AR=$TOOLCHAIN/bin/$SUFFIX-ar export CC=$TOOLCHAIN/bin/$SUFFIX-gcc |