2017-11-01 05:42:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
export SERVER=paper_server.jar
|
|
|
|
if [ ! -f $SERVER ]; then
|
2019-02-24 21:41:27 +00:00
|
|
|
job=Paper
|
2018-08-25 23:16:47 +00:00
|
|
|
case "${VANILLA_VERSION}" in
|
|
|
|
1.13.*)
|
|
|
|
job=Paper-1.13
|
|
|
|
build="lastSuccessfulBuild"
|
|
|
|
;;
|
|
|
|
1.12.2)
|
2017-11-01 05:42:44 +00:00
|
|
|
build="lastSuccessfulBuild";;
|
2018-08-25 23:16:47 +00:00
|
|
|
1.11.2)
|
|
|
|
build="1104";;
|
|
|
|
1.10.2)
|
|
|
|
build="916";;
|
2017-11-01 05:42:44 +00:00
|
|
|
1.9.4)
|
|
|
|
build="773";;
|
|
|
|
1.9.2)
|
|
|
|
build="727";;
|
|
|
|
1.9)
|
|
|
|
build="612";;
|
|
|
|
1.8.8)
|
|
|
|
build="443";;
|
|
|
|
*)
|
|
|
|
build="nosupp";;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [ $build != "nosupp" ]; then
|
2018-04-14 18:43:25 +00:00
|
|
|
rm -f $SERVER
|
2019-02-24 21:41:27 +00:00
|
|
|
downloadUrl=${PAPER_DOWNLOAD_URL:-https://papermc.io/ci/job/$job/$build/artifact/paperclip.jar}
|
2018-08-25 23:16:47 +00:00
|
|
|
echo "Downloading Paper $VANILLA_VERSION from $downloadUrl ..."
|
2017-11-01 05:42:44 +00:00
|
|
|
curl -fsSL -o $SERVER "$downloadUrl"
|
|
|
|
if [ ! -f $SERVER ]; then
|
|
|
|
echo "ERROR: failed to download from $downloadUrl (status=$?)"
|
|
|
|
exit 3
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "ERROR: Version $VERSION is not supported for $TYPE"
|
2019-02-24 21:41:27 +00:00
|
|
|
echo " Refer to https://papermc.io/ci/"
|
2017-11-01 05:42:44 +00:00
|
|
|
echo " for supported versions"
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Normalize on Spigot for operations below
|
|
|
|
export TYPE=SPIGOT
|
|
|
|
|
|
|
|
# Continue to Final Setup
|
|
|
|
exec /start-finalSetup01World $@
|