Improved URL handling for GENERIC_PACK

For #684
This commit is contained in:
Geoff Bourne 2020-12-11 21:12:44 -06:00
parent 0f7bd5f4fd
commit 59ca1ce3a6

View File

@ -1,8 +1,11 @@
#!/bin/bash #!/bin/bash
set -e set -e -o pipefail
. ${SCRIPTS:-/}start-utils . ${SCRIPTS:-/}start-utils
if isDebugging; then
set -x
fi
# CURSE_URL_BASE used in manifest downloads below # CURSE_URL_BASE used in manifest downloads below
CURSE_URL_BASE=${CURSE_URL_BASE:-https://minecraft.curseforge.com/projects} CURSE_URL_BASE=${CURSE_URL_BASE:-https://minecraft.curseforge.com/projects}
@ -140,10 +143,9 @@ fi
if [[ "${GENERIC_PACK}" ]]; then if [[ "${GENERIC_PACK}" ]]; then
if isURL "${GENERIC_PACK}"; then if isURL "${GENERIC_PACK}"; then
generic_pack_url=${GENERIC_PACK} log "Downloading generic pack ..."
GENERIC_PACK=/tmp/$(basename ${generic_pack_url}) curl -fsSL -o /tmp/generic_pack.zip "${GENERIC_PACK}"
log "Downloading generic pack from ${generic_pack_url} ..." GENERIC_PACK=/tmp/generic_pack.zip
curl -fsSL -o ${GENERIC_PACK} ${generic_pack_url}
fi fi
sum_file=/data/.generic_pack.sum sum_file=/data/.generic_pack.sum