Attempt to fix File exist detection

This commit is contained in:
Risto Lahtela 2018-11-12 21:48:33 +02:00 committed by GitHub
parent 8386ed37a6
commit 624dff6f95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,19 +1,12 @@
mkdir $HOME/servers mkdir $HOME/servers
mkdir $HOME/servers/build mkdir $HOME/servers/build
cd $HOME/servers
SPIGOT_FOUND=[[ -e spigot.jar ]]
CRAFTBUKKIT_FOUND=[[ -e craftbukkit.jar ]]
SPONGE_FOUND=[[ -e sponge.jar ]]
cd $HOME/servers/build
wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
git config --global --unset core.autocrlf git config --global --unset core.autocrlf
if [ ! $SPIGOT_FOUND ]; then cd $HOME/servers
if [ ! -e spigot.jar ]; then
cd $HOME/servers/build
echo "Building spigot 1.12.2" echo "Building spigot 1.12.2"
java -jar BuildTools.jar --rev 1.12.2 java -jar BuildTools.jar --rev 1.12.2
cp spigot-1.12.2.jar ../spigot.jar cp spigot-1.12.2.jar ../spigot.jar
@ -21,7 +14,9 @@ else
echo "Found spigot 1.12.2 jar" echo "Found spigot 1.12.2 jar"
fi fi
if [ ! $CRAFTBUKKIT_FOUND ]; then cd $HOME/servers
if [ ! -e craftbukkit.jar ]; then
cd $HOME/servers/build
echo "Building craftbukkit 1.8" echo "Building craftbukkit 1.8"
java -jar BuildTools.jar --rev 1.8 java -jar BuildTools.jar --rev 1.8
cp craftbukkit-1.8.jar ../craftbukkit.jar cp craftbukkit-1.8.jar ../craftbukkit.jar
@ -29,7 +24,9 @@ else
echo "Found craftbukkit 1.8 jar" echo "Found craftbukkit 1.8 jar"
fi fi
if [ ! $SPONGE_FOUND ]; then cd $HOME/servers
if [ ! -e sponge.jar ]; then
cd $HOME/servers/build
echo "Downloading sponge" echo "Downloading sponge"
wget -O sponge.jar https://repo.spongepowered.org/maven/org/spongepowered/spongevanilla/1.12.2-7.1.4/spongevanilla-1.12.2-7.1.4.jar wget -O sponge.jar https://repo.spongepowered.org/maven/org/spongepowered/spongevanilla/1.12.2-7.1.4/spongevanilla-1.12.2-7.1.4.jar
cp sponge.jar ../sponge.jar cp sponge.jar ../sponge.jar