-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildtools.sh
More file actions
40 lines (32 loc) · 969 Bytes
/
buildtools.sh
File metadata and controls
40 lines (32 loc) · 969 Bytes
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
#!/bin/bash
# Source: https://github.com/Imprex-Development/orebfuscator/blob/master/.github/workflows/buildtools.sh
build () {
JAVA_PATH=$"JAVA_HOME_$2_X64"
export JAVA_HOME=${!JAVA_PATH}
echo "Building v$1 with java-$2 ($JAVA_HOME)"
rm -rf $1
mkdir $1
cd $1
curl -o BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
"$JAVA_HOME/bin/java" -jar BuildTools.jar --rev $1 --remapped
cd ..
}
checkVersion () {
echo Checking version $1
if [ ! -d ~/.m2/repository/org/spigotmc/spigot/$1-R0.1-SNAPSHOT ]; then
build $1 $2
fi
}
checkVersion "1.19" "17"
checkVersion "1.19.3" "17"
checkVersion "1.19.4" "17"
checkVersion "1.20.1" "17"
checkVersion "1.20.2" "17"
checkVersion "1.20.4" "17"
checkVersion "1.20.6" "21"
checkVersion "1.21" "21"
checkVersion "1.21.3" "21"
checkVersion "1.21.4" "21"
checkVersion "1.21.5" "21"
checkVersion "1.21.6" "21"
checkVersion "1.21.9" "21"