From 6ffd8075ea36362d19347553588422fb1039189d Mon Sep 17 00:00:00 2001 From: BuildTools Date: Thu, 13 Jul 2023 15:25:33 +0200 Subject: [PATCH] Fixed command name --- build.sh | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/build.sh b/build.sh index f98fc95..fbdfac9 100644 --- a/build.sh +++ b/build.sh @@ -1,26 +1,22 @@ git fetch curl https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar --output BuildTools.jar -if [ -z "$(git status --porcelain)" ]; then - if [ -z "$(git log HEAD..origin/master --oneline)" ]; then - if [ -z "$1" ]; then - echo "Usage: build.sh " - else - if [ -d "$1" ]; then - rm -fr "$1" - fi - - mkdir "$1" - cd "$1" - Java -jar ../BuildTools.jar --rev "$1" - fi + +if [ -z "$(git log HEAD..origin/master --oneline)" ]; then + if [ -z "$1" ]; then + echo "Usage: build.sh " else - 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." + if [ -d "$1" ]; then + rm -fr "$1" + fi + + mkdir "$1" + cd "$1" + java -jar ../BuildTools.jar --rev "$1" fi else - echo "It looks like you have made changes to this repository." - echo "Please remove those changes and re-run this script." + 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." fi