SteamWar/BauSystem
Archiviert
13
0

gradle #252

Manuell gemergt
SteamWar hat 35 Commits von gradle nach master 2021-05-22 21:04:38 +02:00 zusammengeführt
Nur Änderungen aus Commit 3985ec3627 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -119,14 +119,14 @@ if (project.hasProperty("hostname")) {
} }
} }
def await(Process proc) { private def await(Process proc) {
def out = new StringBuilder() def out = new StringBuilder()
def err = new StringBuilder() def err = new StringBuilder()
proc.waitForProcessOutput(out, err) proc.waitForProcessOutput(out, err)
return [out, err, proc.exitValue()] return [out, err, proc.exitValue()]
} }
def shell(String command) { private def shell(String command) {
if (operatingSystem == "unix") { if (operatingSystem == "unix") {
return ['bash', '-c', command].execute() return ['bash', '-c', command].execute()
} else { } else {
@ -134,7 +134,7 @@ def shell(String command) {
} }
} }
def serverStart(String serverName) { private def serverStart(String serverName) {
def proc = shell("ssh -t ${hostname} \"./mc ${serverName}\"") def proc = shell("ssh -t ${hostname} \"./mc ${serverName}\"")
Thread outputThread = new Thread({ Thread outputThread = new Thread({
@ -197,7 +197,7 @@ private static def awaitClose(Process proc, Thread outputThread, Thread inputThr
inputThread.interrupt() inputThread.interrupt()
} }
def answer(String question) { private def answer(String question) {
while (System.in.available() > 0) System.in.read() while (System.in.available() > 0) System.in.read()
println(question) println(question)
boolean valid = "Yy".contains(((char)System.in.read()).toString()) boolean valid = "Yy".contains(((char)System.in.read()).toString())