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