mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-12 13:22:28 +00:00
fix/681 (#719)
* [shellcheck] prevent globbing * fix/681 remove old PaperMC before downloading new Fixes #681 Co-authored-by: Dubhar <thorsten.jerosch@gmail.com>
This commit is contained in:
parent
8c6ca5e999
commit
fdf5fb46bc
1 changed files with 6 additions and 2 deletions
|
@ -28,7 +28,7 @@ else
|
|||
VANILLA_VERSION=$(echo "$versions" | jq -r '.versions[-1]')
|
||||
log "WARN: using ${VANILLA_VERSION} since that's the latest provided by PaperMC"
|
||||
# re-execute the current script with the newly computed version
|
||||
exec $0 "$@"
|
||||
exec "$0" "$@"
|
||||
fi
|
||||
log "ERROR: ${VANILLA_VERSION} is not published by PaperMC"
|
||||
log " Set VERSION to one of the following: "
|
||||
|
@ -56,6 +56,10 @@ else
|
|||
zarg=(-z "$SERVER")
|
||||
fi
|
||||
|
||||
log "Removing old PaperMC versions ..."
|
||||
paperJarSearchString=${SERVER/$build/[0-9]*}
|
||||
find . -name "$paperJarSearchString" ! -name "$SERVER" -delete -print
|
||||
|
||||
log "Downloading PaperMC $VANILLA_VERSION (build $build) ..."
|
||||
curl -fsSL -o "$SERVER" "${zarg[@]}" \
|
||||
"https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}/builds/${build}/downloads/${SERVER}" \
|
||||
|
@ -71,4 +75,4 @@ export TYPE=SPIGOT
|
|||
export SKIP_LOG4J_CONFIG=true
|
||||
|
||||
# Continue to Final Setup
|
||||
exec ${SCRIPTS:-/}start-finalSetupWorld $@
|
||||
exec ${SCRIPTS:-/}start-finalSetupWorld "$@"
|
||||
|
|
Loading…
Reference in a new issue