diff options
| author | eltrac <hi@eltr.ac> | 2026-08-28 22:33:05 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-08-28 22:59:46 +0800 |
| commit | c83d4c99fe011cb17690c248b4757d41e6e8b1d5 (patch) | |
| tree | 3dd11eeb6eb4de899bc686175f27099040d5ec19 | |
| parent | dd6d84581ef3a2fd1cca8c368ea54eb103033c66 (diff) | |
cli: run command and parse cli args
| -rw-r--r-- | tempest.lisp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tempest.lisp b/tempest.lisp index a0ecb22..02bc03b 100644 --- a/tempest.lisp +++ b/tempest.lisp @@ -46,3 +46,14 @@ (format t "Built ~a, because of ~a~%" built-file change) nil))))) +(defun run (subcommand &rest args) + (cond ((equal subcommand "build") + (mapcar 'build args)) + ;; TODO support watching multiple dirs + ((equal subcommand "watch") + (watch (car args))))) + +(defun main () + (let ((cli-args (cdr sb-ext:*posix-argv*))) + (run (car cli-args) (cdr cli-args)))) + |
