From c83d4c99fe011cb17690c248b4757d41e6e8b1d5 Mon Sep 17 00:00:00 2001 From: eltrac Date: Fri, 28 Aug 2026 22:33:05 +0800 Subject: cli: run command and parse cli args --- tempest.lisp | 11 +++++++++++ 1 file changed, 11 insertions(+) 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)))) + -- cgit v1.2.3