mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-25 06:26:27 +02:00
13 lines
303 B
Bash
Executable file
13 lines
303 B
Bash
Executable file
#!/bin/bash
|
|
|
|
cd /tmp/$1
|
|
|
|
sed 's/^.*$/:- forall((Goal = (\0), call(Goal)), (write(Goal), nl))./' stdin.stdin |
|
|
cat code.code - > code.pl
|
|
|
|
if [ -s args.args ]
|
|
then
|
|
echo ":- main($(jq --raw-input -c --slurp 'split("\n")' args.args))." >> code.pl
|
|
fi
|
|
|
|
timeout -s KILL 3 swipl -g true -t halt code.pl
|