gradle #252
@ -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())
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren