diff options
author | Colin Okay <cbeok@protonmail.com> | 2020-09-09 10:49:11 -0500 |
---|---|---|
committer | Colin Okay <cbeok@protonmail.com> | 2020-09-09 10:49:11 -0500 |
commit | 9ed8ffd48c35872531b881f2ccf10c056dbdc680 (patch) | |
tree | 7bca183be22bf2aa75b1f49b186fa4bf33a9c684 /run.lisp | |
parent | c46e46fc739c84f08d2d0af581a54a4518ec04fb (diff) |
added system for cli tool
But the ecl build doesn't work...
Diffstat (limited to 'run.lisp')
-rw-r--r-- | run.lisp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/run.lisp b/run.lisp new file mode 100644 index 0000000..8eeb603 --- /dev/null +++ b/run.lisp @@ -0,0 +1,33 @@ + +(defpackage #:imbricate.run + (:use #:cl) + (:export #:main)) + +(in-package :imbricate.run) + +(defun print-help () + (format t "USAGE: imbricate SOURCE-DIR TARGET-DIR SHEET-TITLE~%~%") + (format t " SOURCE-DIR a directory containing png files. Non png files are skipped~%") + (format t " TARGET-DIR a directory where the tilesheet is to be built.~%") + (format t " SHEET-TITLE a name used for this sheet and its meta info~%~%")) + +#+ecl +(defun main () + (print (ext:command-args))) + ;; (unless (= 4 (length (ext:command-args))) + ;; (print-help) + ;; (ext:quit)) + ;; (destructuring-bind (src target title) (cdr (ext:command-args)) + ;; (imbricate:imbricate-and-save src target title) + ;; (ext:quit))) + +#+sbcl +(defun main () + (unless (= 4 (length sb-ext:*posix-argv*)) + (print-help) + (uiop:quit)) + (destructuring-bind (src target title) (cdr sb-ext:*posix-argv*) + (imbricate:imbricate-and-save src target title) + (uiop:quit))) + + |