From 0d2a8ac2ed0d3229067a5b52055df30d3077abe5 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sun, 14 Jul 2019 15:52:49 +0200 Subject: check only for signing if ANDROID_BUILD_TOOLS is set --- prepareForDistribution.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/prepareForDistribution.sh b/prepareForDistribution.sh index 902e6559..339a9717 100755 --- a/prepareForDistribution.sh +++ b/prepareForDistribution.sh @@ -31,13 +31,6 @@ EXPECTED_FINGERPRINT="SHA256:9C:94:DB:F8:46:FD:95:97:47:57:17:2A:6A:8D:9A:9B:DF: -# check global vars -if [[ -z ${ANDROID_BUILD_TOOLS} ]] -then - echo "ERROR: Environment variable ANDROID_BUILD_TOOLS not set! Please add it to your .bashrc file. Exiting." - exit -fi - # init parameters for ((i=1;i<=$#;i++)); do @@ -203,6 +196,13 @@ fi if [[ ${DO_SIGN} == true ]] then + # check global vars + if [[ -z ${ANDROID_BUILD_TOOLS} ]] + then + echo "ERROR: Environment variable ANDROID_BUILD_TOOLS not set! Please add it to your environment variables. Exiting." + exit + fi + if [[ -z ${FILE_NAME} && ${DO_BUILD} == false ]] then echo -e "ERROR: Sign only needs a file name. Please check ./prepareForDistribution -help!" -- cgit v1.2.3