From 401958c0d615c5992bbc5b635da99b6d743b7b33 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 15 Sep 2019 09:54:13 -0500 Subject: [PATCH] Add debugs for Fabric setup For #361 --- start-deployFabric | 11 +++++++++-- start-utils | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/start-deployFabric b/start-deployFabric index e9ad8394..13ace55b 100644 --- a/start-deployFabric +++ b/start-deployFabric @@ -1,5 +1,7 @@ #!/bin/bash -set -u +set -eu + +. /start-utils export TYPE=FABRIC @@ -30,6 +32,7 @@ fi installMarker=".fabric-installed-${VANILLA_VERSION}-${FABRIC_VERSION:-manual}" +debug Checking for installMarker ${installMarker} if [[ ! -e $installMarker ]]; then if [[ ! -e $FABRIC_INSTALLER ]]; then if [[ -z $FABRIC_INSTALLER_URL ]]; then @@ -46,7 +49,11 @@ if [[ ! -e $installMarker ]]; then fi fi - echo "Installing Fabric $FABRIC_VERSION using $FABRIC_INSTALLER" + if isDebugging; then + debug "Installing Fabric $FABRIC_VERSION using $FABRIC_INSTALLER with mcversion ${VANILLA_VERSION}" + else + echo "Installing Fabric $FABRIC_VERSION using $FABRIC_INSTALLER" + fi tries=3 set +e while ((--tries >= 0)); do diff --git a/start-utils b/start-utils index 13a29971..8a2cd621 100644 --- a/start-utils +++ b/start-utils @@ -28,7 +28,7 @@ function isTrue { } function isDebugging { - if [[ ${DEBUG^^} = TRUE ]]; then + if [[ -v DEBUG ]] && [[ ${DEBUG^^} = TRUE ]]; then return 0 else return 1