diff --git a/scripts/build_app.sh b/scripts/build_app.sh index c7198fda5..9901b3cb7 100755 --- a/scripts/build_app.sh +++ b/scripts/build_app.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -x -e +set -e source ./env.sh @@ -13,6 +13,18 @@ usage() { exit 1 } +confirmDisclaimer() { + while true; do + # shellcheck disable=SC2162 + read -p "Please confirm you understand that when using certain values for and there is a chance that the resulting app WILL DELETE CRITICAL WALLET DATA. Are you sure you want to continue? (yes/no): " response + case $response in + [Yy][Ee][Ss] ) echo "Continuing..."; break;; + [Nn][Oo] ) exit 0;; + * ) echo "Invalid response";; + esac + done +} + # required args unset -v APP_VERSION_STRING unset -v APP_BUILD_NUMBER @@ -54,6 +66,9 @@ if [ -z "$APP_NAMED_ID" ]; then usage fi +confirmDisclaimer +set -x + # checks for the correct platform dir and pushes it for later if printf '%s\0' "${APP_PLATFORMS[@]}" | grep -Fxqz -- "${APP_BUILD_PLATFORM}"; then pushd "${APP_PROJECT_ROOT_DIR}/scripts/${APP_BUILD_PLATFORM}" diff --git a/scripts/env.sh b/scripts/env.sh index d47b6f2f4..d938356c4 100755 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -x -e +set -e # set project root THIS_SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )