diff options
author | Jeffrey Walton <noloader@gmail.com> | 2021-02-07 07:27:12 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2021-02-07 07:27:12 -0500 |
commit | 9b3d0272f8b99cc9e809901f7b835d84a26039e0 (patch) | |
tree | d112bbbbcbb0375278a517ecdd91856137e25942 /TestScripts/install-ndk.sh | |
parent | 019910dc6803947544de6b31263f69b9625cecc8 (diff) | |
download | cryptopp-git-9b3d0272f8b99cc9e809901f7b835d84a26039e0.tar.gz |
Update test scripts
Diffstat (limited to 'TestScripts/install-ndk.sh')
-rwxr-xr-x | TestScripts/install-ndk.sh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/TestScripts/install-ndk.sh b/TestScripts/install-ndk.sh index b202e5f6..99591794 100755 --- a/TestScripts/install-ndk.sh +++ b/TestScripts/install-ndk.sh @@ -37,16 +37,30 @@ if [ -z "${ANDROID_SDK_ROOT}" ]; then echo "ERROR: ANDROID_SDK_ROOT is not set for ${USER}. Please set it." - echo "ANDROID_SDK_ROOT is '${ANDROID_SDK_ROOT}'" exit 1 fi if [ -z "${ANDROID_NDK_ROOT}" ]; then echo "ERROR: ANDROID_NDK_ROOT is not set for ${USER}. Please set it." - echo "ANDROID_NDK_ROOT '${ANDROID_NDK_ROOT}'" exit 1 fi +if [[ ! -d "${ANDROID_SDK_ROOT}" ]]; then + echo "ANDROID_SDK_ROOT does not exist. The directory will be created." + if ! mkdir -p "${ANDROID_SDK_ROOT}"; then + echo "Failed to create ANDROID_SDK_ROOT '${ANDROID_SDK_ROOT}'." + echo "Is ANDROID_SDK_ROOT writeable? Maybe you need to run this script with 'sudo -E'." + fi +fi + +if [[ ! -d "${ANDROID_NDK_ROOT}" ]]; then + echo "ANDROID_NDK_ROOT does not exist. The directory will be created." + if ! mkdir -p "${ANDROID_NDK_ROOT}"; then + echo "Failed to create ANDROID_NDK_ROOT '${ANDROID_NDK_ROOT}'." + echo "Is ANDROID_NDK_ROOT writeable? Maybe you need to run this script with 'sudo -E'." + fi +fi + # Temp directory if [[ -z "$TMPDIR" ]]; then TMPDIR="$HOME/tmp" |