mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-11-22 06:34:21 +00:00
Confirm latest Spigot jar is always downloaded
This commit is contained in:
1 parent
a07ae685e2
commit
38028f7d0c
1 file changed
+11
-7
@@ -62,8 +62,12 @@ function downloadSpigot {
|
|||||||
downloadUrl="https://cdn.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VANILLA_VERSION}.jar"
|
downloadUrl="https://cdn.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VANILLA_VERSION}.jar"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f $SERVER ]; then
|
||||||
|
# tell curl to only download when newer
|
||||||
|
zarg="-z $SERVER"
|
||||||
|
fi
|
||||||
log "Downloading $match from $downloadUrl ..."
|
log "Downloading $match from $downloadUrl ..."
|
||||||
curl -fsSL -o $SERVER "$downloadUrl"
|
curl -fsSL -o $SERVER $zarg "$downloadUrl"
|
||||||
if [[ $? != 0 || $(grep -c "DOCTYPE html" $SERVER) != 0 ]]; then
|
if [[ $? != 0 || $(grep -c "DOCTYPE html" $SERVER) != 0 ]]; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
||||||
@@ -89,12 +93,12 @@ case "$TYPE" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ ! -f $SERVER ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
if isTrue "$BUILD_SPIGOT_FROM_SOURCE" || isTrue "$BUILD_FROM_SOURCE"; then
|
||||||
if isTrue "$BUILD_SPIGOT_FROM_SOURCE" || isTrue "$BUILD_FROM_SOURCE"; then
|
if [ ! -f $SERVER ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
||||||
buildSpigotFromSource
|
buildSpigotFromSource
|
||||||
else
|
fi
|
||||||
downloadSpigot
|
else
|
||||||
fi
|
downloadSpigot
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Normalize on Spigot for operations below
|
# Normalize on Spigot for operations below
|
||||||
|
|||||||
Reference in new issue
Block a user