all repos — mn @ 2e36b444705603bda077fce3b5af84f7153bbb1a

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 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