Commit 83ad3bf2 authored by mihneagogu's avatar mihneagogu
Browse files

[all] removed extra noisy prints

parent 6bbe51cb
Pipeline #172388 passed with stages
in 3 minutes and 35 seconds
#!/bin/sh
echo "SHELL SCRIPT STARTED!!!!!!!!\n\n\n\n\n"
TARGET="testfile=@$1"
/usr/bin/curl -s -F "options[]=-x" -F "run=" -F $TARGET "https://teaching.doc.ic.ac.uk/wacc_compiler/run.cgi"
echo "Response of execution of curl command: "
echo $?
curl -s -F "options[]=-x" -F "run=" -F $TARGET "https://teaching.doc.ic.ac.uk/wacc_compiler/run.cgi"
......@@ -79,7 +79,7 @@ public class WebServer {
Process curl = pb.start();
BufferedReader br = new BufferedReader(new InputStreamReader(curl.getInputStream()));
try {
System.out.println("Return status of whole shell script: " + curl.waitFor());
curl.waitFor();
} catch (InterruptedException iex) {
tempFile.delete();
throw new IOException();
......@@ -91,8 +91,7 @@ public class WebServer {
String field = "\"compiler_out\":";
String out = content.substring(content.indexOf(field) + field.length());
// out.substring(1, out.length() - 2) is what is actually needed for the correct compiler reponse
new WaccEditorPage(code, content).writeTo(resp);
new WaccEditorPage(code, out.substring(1, out.length() - 2)).writeTo(resp);
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment