File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -62,8 +62,12 @@ function downloadSpigot {
6262 downloadUrl=" https://cdn.getbukkit.org/${getbukkitFlavor} /${getbukkitFlavor} -${VANILLA_VERSION} .jar"
6363 fi
6464
65+ if [ -f $SERVER ]; then
66+ # tell curl to only download when newer
67+ zarg=" -z $SERVER "
68+ fi
6569 log " Downloading $match from $downloadUrl ..."
66- curl -fsSL -o $SERVER " $downloadUrl "
70+ curl -fsSL -o $SERVER $zarg " $downloadUrl "
6771 if [[ $? != 0 || $( grep -c " DOCTYPE html" $SERVER ) != 0 ]]; then
6872 cat << EOF
6973
@@ -89,12 +93,12 @@ case "$TYPE" in
8993 ;;
9094esac
9195
92- if [ ! -f $SERVER ] || [ -n " $FORCE_REDOWNLOAD " ] ; then
93- if isTrue " $BUILD_SPIGOT_FROM_SOURCE " || isTrue " $BUILD_FROM_SOURCE " ; then
94- buildSpigotFromSource
95- else
96- downloadSpigot
97- fi
96+ if isTrue " $BUILD_SPIGOT_FROM_SOURCE " || isTrue " $BUILD_FROM_SOURCE " ; then
97+ if [ ! -f $SERVER ] || [ -n " $FORCE_REDOWNLOAD " ] ; then
98+ buildSpigotFromSource
99+ fi
100+ else
101+ downloadSpigot
98102fi
99103
100104# Normalize on Spigot for operations below
You can’t perform that action at this time.
0 commit comments