summaryrefslogtreecommitdiff
path: root/tempest.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'tempest.lisp')
-rw-r--r--tempest.lisp14
1 files changed, 11 insertions, 3 deletions
diff --git a/tempest.lisp b/tempest.lisp
index 02bc03b..6d279c9 100644
--- a/tempest.lisp
+++ b/tempest.lisp
@@ -25,12 +25,18 @@
target-file))
NIL)))
+(defun build-template-and-print (name)
+ (let ((built (build-template name)))
+ (if built
+ (format t "built ~a~%" built)
+ (format t "ignore ~a, not a valid tempest file.~%" name))))
+
(defun build (dir)
(cl-fad:walk-directory dir
(lambda (path-name)
(let ((name (namestring path-name)))
(when (str:ends-with-p ".lisp" name :ignore-case T)
- (build-template name))))))
+ (build-template-and-print name))))))
;; TODO handle frequent/simultaneous events, only build once
;; TODO handle :MOVE event, delete old one and create new one
@@ -48,10 +54,12 @@
(defun run (subcommand &rest args)
(cond ((equal subcommand "build")
- (mapcar 'build args))
+ (mapcar 'build (car args)))
+ ((equal subcommand "build-one")
+ (mapcar 'build-template-and-print (car args)))
;; TODO support watching multiple dirs
((equal subcommand "watch")
- (watch (car args)))))
+ (watch (car (car args))))))
(defun main ()
(let ((cli-args (cdr sb-ext:*posix-argv*)))