mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
parent
54027049d3
commit
ffec50141a
@ -81,6 +81,12 @@ if [[ "$MODS" ]]; then
|
|||||||
do
|
do
|
||||||
if isURL $i; then
|
if isURL $i; then
|
||||||
log "Downloading mod/plugin $i ..."
|
log "Downloading mod/plugin $i ..."
|
||||||
|
if isValidFileURL jar "$i"; then
|
||||||
|
if ! curl -fsSL -o "${out_dir}/$(getFilenameFromUrl "${i}")" "${i}"; then
|
||||||
|
log "ERROR: failed to download from $i into $out_dir"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
else
|
||||||
effective_url=$(resolveEffectiveUrl "$i")
|
effective_url=$(resolveEffectiveUrl "$i")
|
||||||
if isValidFileURL jar "${effective_url}"; then
|
if isValidFileURL jar "${effective_url}"; then
|
||||||
out_file=$(getFilenameFromUrl "${effective_url}")
|
out_file=$(getFilenameFromUrl "${effective_url}")
|
||||||
@ -92,6 +98,7 @@ if [[ "$MODS" ]]; then
|
|||||||
log "ERROR: $effective_url resolved from $i is not a valid jar URL"
|
log "ERROR: $effective_url resolved from $i is not a valid jar URL"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
log "ERROR Invalid URL given in MODS: $i"
|
log "ERROR Invalid URL given in MODS: $i"
|
||||||
exit 2
|
exit 2
|
||||||
|
Loading…
Reference in New Issue
Block a user