piston/lxc/executors/java

8 lines
229 B
Plaintext
Raw Normal View History

2021-01-17 01:54:57 +01:00
#!/bin/bash
2018-10-24 07:34:33 +02:00
cd /tmp/$2
2021-01-21 20:56:23 +01:00
name=$(grep -Po "(?<=\n|\A)\s*(public\s+)?(class|interface)\s+\K([^\/\\\\\n\s{]+)" code.code)
2021-01-17 16:44:40 +01:00
cp code.code $name.java
javac $name.java
timeout -s KILL 3 xargs -a args.args -d '\n' java $name < stdin.stdin