[mc] Check for valid $FORGE_INSTALLER

This commit is contained in:
Geoff Bourne 2017-06-05 21:34:15 -05:00
parent 71527b87c1
commit 2891e1ac3e

View File

@ -158,6 +158,9 @@ function installForge {
FORGE_INSTALLER="/tmp/forge-$shortForgeVersion-installer.jar" FORGE_INSTALLER="/tmp/forge-$shortForgeVersion-installer.jar"
elif [[ -z $FORGE_INSTALLER ]]; then elif [[ -z $FORGE_INSTALLER ]]; then
FORGE_INSTALLER="/tmp/forge-installer.jar" FORGE_INSTALLER="/tmp/forge-installer.jar"
elif [[ ! -e $FORGE_INSTALLER ]]; then
echo "ERROR: the given Forge installer doesn't exist : $FORGE_INSTALLER"
exit 2
fi fi
installMarker=".forge-installed-$shortForgeVersion" installMarker=".forge-installed-$shortForgeVersion"
@ -187,7 +190,7 @@ function installForge {
else else
echo "Downloading $FORGE_INSTALLER_URL ..." echo "Downloading $FORGE_INSTALLER_URL ..."
if ! curl -o $FORGE_INSTALLER -fsSL $FORGE_INSTALLER_URL; then if ! curl -o $FORGE_INSTALLER -fsSL $FORGE_INSTALLER_URL; then
echo "Failed to download from specification location $FORGE_INSTALLER_URL" echo "Failed to download from given location $FORGE_INSTALLER_URL"
exit 2 exit 2
fi fi
fi fi