19 lines
No EOL
380 B
Text
19 lines
No EOL
380 B
Text
(seq
|
|
(def cmd (vec.first argv))
|
|
(def args (vec.tail argv))
|
|
|
|
(if (bool.or (null? cmd) (str.starts-with? cmd "-")) (seq
|
|
(trace "Error: No command specified")
|
|
(return 1)
|
|
))
|
|
|
|
(try
|
|
(match cmd
|
|
("run" (include "run"))
|
|
(_ (trace "Error: Command '" cmd "' not found"))
|
|
)
|
|
(lambda [msg type] (seq
|
|
(trace type ": " msg)
|
|
(return 1)))
|
|
)
|
|
) |