diff --git a/system-images/android/sdk/build-cmake-native b/system-images/android/sdk/build-cmake-native index 55b625a..af24b8c 100755 --- a/system-images/android/sdk/build-cmake-native +++ b/system-images/android/sdk/build-cmake-native @@ -1,36 +1,37 @@ #!/bin/bash set -e name=$1 shift repo=$1 shift srcdir="`pwd`/src" cloned=0 if ! [ -d "$srcdir"/$name ] ; then mkdir -p "$srcdir" pushd "$srcdir" git clone --depth 1 $repo --single-branch $GIT_EXTRA cloned=1 popd fi BUILDROOT=${BUILD:-build} mkdir $BUILDROOT/$name -p pushd $BUILDROOT/$name cmake "$srcdir"/$name/$EXTRA_CMAKE_SUBDIR $@ cmake --build . -- install -j`nproc` popd if [ "${PERSIST-1}" -eq 1 ]; then echo "leaving the build directory intact" else + echo "cleaning $BUILDROOT/$name" rm -rf $BUILDROOT/$name if [ "$cloned" -eq 1 ]; then rm -rf src/$name fi fi