mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-11-13 07:15:28 +03:00
26 lines
450 B
Bash
Executable File
26 lines
450 B
Bash
Executable File
#!/usr/bin/env bash
|
|
if [[ $# -eq 0 ]] ; then
|
|
echo 'A build version must be supplied as the first argument.'
|
|
exit 1
|
|
fi
|
|
|
|
cd ..
|
|
|
|
./gradlew server:dist -Pbuildversion=$1
|
|
|
|
excode=$?
|
|
|
|
if [ $excode -ne 0 ]; then
|
|
echo $excode
|
|
exit 1
|
|
fi
|
|
|
|
while true; do
|
|
#auto-restart until ctrl-c or exit 0
|
|
java -jar -XX:+HeapDumpOnOutOfMemoryError server/build/libs/server-release.jar
|
|
excode=$?
|
|
if [ $excode -eq 0 ] || [ $excode -eq 130 ]; then
|
|
exit 0
|
|
fi
|
|
done
|