mirror of
https://github.com/engineer-man/piston.git
synced 2025-06-08 11:16:27 +02:00
pkg(brachylog-1.0.0): added brachylog
This commit is contained in:
parent
e95d386697
commit
8d32385b41
7 changed files with 52 additions and 1 deletions
19
packages/brachylog/1.0.0/run
vendored
Normal file
19
packages/brachylog/1.0.0/run
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# save the file for later
|
||||
file="$1"
|
||||
|
||||
# remove the file from $@
|
||||
shift
|
||||
|
||||
# save stdin as $@ joined by newlines
|
||||
stdin=`printf "%s\n" "$@"`
|
||||
|
||||
# save code as the contents of $file
|
||||
code=`cat "$file"`
|
||||
|
||||
# go to the directory where brachylog.pl is so the imports work
|
||||
cd "$BRACHYLOG_PATH"/prolog_parser
|
||||
|
||||
# run swi prolog with code and stdin
|
||||
swipl -f brachylog.pl "$code" "$stdin"
|
Loading…
Add table
Add a link
Reference in a new issue