Add debugs for Fabric setup

For #361
This commit is contained in:
Geoff Bourne 2019-09-15 09:54:13 -05:00
parent 8859d223bf
commit 401958c0d6
2 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -28,7 +28,7 @@ function isTrue {
}
function isDebugging {
if [[ ${DEBUG^^} = TRUE ]]; then
if [[ -v DEBUG ]] && [[ ${DEBUG^^} = TRUE ]]; then
return 0
else
return 1