-
Notifications
You must be signed in to change notification settings - Fork 0
/
start-deployPaper
53 lines (49 loc) · 1.17 KB
/
start-deployPaper
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
export SERVER=paper_server.jar
if [ ! -f $SERVER ]; then
local build
local helper
case "$VERSION" in
latest|LATEST|1.14.3)
helper="-1.14"
build="lastSuccessfulBuild";;
1.13.2)
helper="-1.13"
build="lastSuccessfulBuild";;
1.12.2)
helper=""
build="lastSuccessfulBuild";;
1.11.2)
helper=""
build="1104";;
1.10.2)
helper=""
build="916";;
1.9.4)
helper=""
build="773";;
1.8.8)
helper=""
build="443";;
*)
build="nosupp";;
esac
if [ $build != "nosupp" ]; then
rm $SERVER
downloadUrl=${PAPER_DOWNLOAD_URL:-https://papermc.io/ci/job/Paper$helper/$build/artifact/paperclip.jar}
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"
echo " Refer to https://papermc.io/ci/job/Paper/"
echo " for supported versions"
exit 2
fi
fi
# Normalize on Spigot for operations below
export TYPE=SPIGOT
# Continue to Final Setup
exec start-finalSetup01World $@