get-spigot-linux/build.sh

23 lines
716 B
Bash
Raw Normal View History

2018-12-21 20:55:48 +00:00
git fetch
curl https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar --output BuildTools.jar
2023-07-13 13:25:33 +00:00
if [ -z "$(git log HEAD..origin/master --oneline)" ]; then
if [ -z "$1" ]; then
echo "Usage: build.sh <version>"
else
if [ -d "$1" ]; then
2018-12-21 20:55:48 +00:00
rm -fr "$1"
fi
2023-07-13 13:25:33 +00:00
mkdir "$1"
cd "$1"
2023-07-18 14:09:19 +00:00
java -jar ../BuildTools.jar --rev "$1" -Xmx1024M
2018-12-21 20:55:48 +00:00
fi
else
2023-07-13 13:25:33 +00:00
echo "It looks like there are incomming updates to this repository. Pulling those changes now."
git pull
echo "This repositry has been updated. That means that this script might also have been updated. This script will now exit to ensure that the newest version is used."
echo "IMPORTANT: Please re-run this script."
2018-12-21 20:55:48 +00:00
fi