Android example: improve checks for existence of output directory.
This commit is contained in:
parent
d1a6595c20
commit
eca8cf94f4
@ -11,13 +11,15 @@ if [ ! -d "$ANDROID_SDK_ROOT" ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$OPENSSL_INSTALL_DIR" ] ; then
|
||||
echo "Error: directory \"$OPENSSL_INSTALL_DIR\" already exists. Delete it manually to proceed."
|
||||
if [ -e "$OPENSSL_INSTALL_DIR" ] ; then
|
||||
echo "Error: file or directory \"$OPENSSL_INSTALL_DIR\" already exists. Delete it manually to proceed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source ./check-environment.sh || exit 1
|
||||
|
||||
mkdir -p $OPENSSL_INSTALL_DIR || exit 1
|
||||
|
||||
ANDROID_SDK_ROOT="$(cd "$(dirname -- "$ANDROID_SDK_ROOT")" >/dev/null; pwd -P)/$(basename -- "$ANDROID_SDK_ROOT")"
|
||||
OPENSSL_INSTALL_DIR="$(cd "$(dirname -- "$OPENSSL_INSTALL_DIR")" >/dev/null; pwd -P)/$(basename -- "$OPENSSL_INSTALL_DIR")"
|
||||
|
||||
|
@ -4,8 +4,8 @@ cd $(dirname $0)
|
||||
ANDROID_SDK_ROOT=${1:-SDK}
|
||||
ANDROID_NDK_VERSION=${2:-23.2.8568313}
|
||||
|
||||
if [ -d "$ANDROID_SDK_ROOT" ] ; then
|
||||
echo "Error: directory \"$ANDROID_SDK_ROOT\" already exists. Delete it manually to proceed."
|
||||
if [ -e "$ANDROID_SDK_ROOT" ] ; then
|
||||
echo "Error: file or directory \"$ANDROID_SDK_ROOT\" already exists. Delete it manually to proceed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user