add file-check

This commit is contained in:
2022-02-22 00:30:53 +01:00
parent 6dd3736e56
commit 4e6a74017b
2 changed files with 33 additions and 12 deletions

View File

@@ -6,10 +6,10 @@ Paar wunderbare Scripts
## Spigot Auto-Build Scripts
Systemrequirements:<br>
Distribution: Debian 9-10 / Ubuntu 16.04 - 18.04<br>
Distribution: Debian 9-11 / Ubuntu 16.04 - 20.04<br>
CPU: 1 vCore <br>
Ram: 2GB <br><br>
![](https://img.shields.io/badge/Debian%2010-work!-green) ![](https://img.shields.io/badge/Debian%209-work!-green) ![](https://img.shields.io/badge/Ubuntu%2018.04-work!-green)<br>
![](https://img.shields.io/badge/Debian%2011-work!-green) ![](https://img.shields.io/badge/Debian%2010-work!-green) ![](https://img.shields.io/badge/Debian%209-work!-green) ![](https://img.shields.io/badge/Ubuntu%2020.04-work!-green) ![](https://img.shields.io/badge/Ubuntu%2018.04-work!-green)<br>
<code>bash <(wget -O - 'https://git.io/JYBMI')</code>
@@ -17,7 +17,7 @@ Ram: 2GB <br><br>
## TS3AudioBot Installer
![](https://img.shields.io/badge/Debian%2010-work!-green) ![](https://img.shields.io/badge/Debian%209-work!-green) ![](https://img.shields.io/badge/Ubuntu%2018.04-work!-green)<br>
![](https://img.shields.io/badge/Debian%2011-work!-green) ![](https://img.shields.io/badge/Debian%2010-work!-green) ![](https://img.shields.io/badge/Debian%209-work!-green) ![](https://img.shields.io/badge/Ubuntu%2020.04-work!-green) ![](https://img.shields.io/badge/Ubuntu%2018.04-work!-green)<br>
<code>bash <(wget -O - 'https://git.io/JYBMG')</code>

View File

@@ -23,14 +23,35 @@ echo ""
echo ""
echo ""
echo ""
rm BuildTools.jar
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
clear
echo "Checking software packages ..."
apt-get update
apt-get install git default-jdk -y
echo "start building ..."
sleep 2
java -jar BuildTools.jar
FILE=BuildTool.jar
if [ -f "$FILE" ]; then # Datei ist nicht vorhanden
echo "Checking software packages ..."
apt-get update
apt-get install git default-jdk openjdk-17-jdk openjdk-17-jre -y
clear
echo "Checking software packages ..."
echo -n "Which version should be built? (z.B. 1.18): "
read;
echo "start building Spigot-${REPLY} ..."
sleep 2
java -jar BuildTools.jar --rev ${REPLY}
else # Datei ist nicht vorhanden
echo "downloading BuildTools ..."
rm BuildTools.jar
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
clear
echo "downloading BuildTools ..."
echo "Checking software packages ..."
apt-get update
apt-get install git default-jdk openjdk-17-jdk openjdk-17-jre -y
clear
echo "downloading BuildTools ..."
echo "Checking software packages ..."
echo -n "Which version should be built? (z.B. 1.18): "
read;
echo "start building Spigot-${REPLY} ..."
sleep 2
java -jar BuildTools.jar --rev ${REPLY}
fi