about summary refs log tree commit diff stats
path: root/trainfuck
diff options
context:
space:
mode:
authorCase Duckworth2022-07-06 22:00:30 -0500
committerCase Duckworth2022-07-06 22:00:30 -0500
commit3c6ce827a002c54deb88e40cbddddb03866e695b (patch)
treef9286a57c2c6821b718efb682ddbca453411c17e /trainfuck
parentProbably version ... whatever the next higher one is (diff)
downloadtrainfuck-3c6ce827a002c54deb88e40cbddddb03866e695b.tar.gz
trainfuck-3c6ce827a002c54deb88e40cbddddb03866e695b.zip
Big update
Diffstat (limited to 'trainfuck')
-rwxr-xr-xtrainfuck19
1 files changed, 17 insertions, 2 deletions
diff --git a/trainfuck b/trainfuck index 22d1009..dec743b 100755 --- a/trainfuck +++ b/trainfuck
@@ -10,6 +10,21 @@
10 10
11### Code: 11### Code:
12 12
13TRAINFUCK=trainfuck.awk 13TRAINFUCK="$(dirname "$0")/trainfuck.awk"
14 14
15gawk -v EXE_NAME="$(basename $0)" -f "$TRAINFUCK" -- "$@" 15case "$(realpath "$(command -v awk)")" in
16*gawk)
17 AWK=gawk
18 EXTRA_AWK_ARGS="--characters-as-bytes" # --posix overrides
19 ;;
20*mawk)
21 AWK=mawk
22 EXTRA_AWK_ARGS="-Wposix"
23 ;;
24*)
25 AWK=awk
26 EXTRA_AWK_ARGS=
27 ;;
28esac
29
30"$AWK" -v EXE_NAME="$(basename $0)" -f "$TRAINFUCK" $EXTRA_AWK_ARGS -- "$@"