all repos — mn @ fade7297a45e8660f982651553f85f983bca0eba

A truly minimal concatenative programming language.

mntool.mn

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
#!/usr/bin/env mn

; Validation
(args size 2 <) ("No task specified" puts pop 1 exit) when

args 1 get ":" split "taskspec" let
taskspec 0 get "task" let
"default" "subtask" let
(taskspec size 1 >) (taskspec 1 get "subtask" bind) when

"tasks/$#.mn" (task) interpolate "taskfile" let

taskfile read eval

"$#__$#" (task subtask) interpolate eval