summaryrefslogtreecommitdiff
path: root/build.lisp
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2020-09-07 17:00:53 -0500
committerColin Okay <cbeok@protonmail.com>2020-10-12 09:37:42 -0500
commit4cf76c98eec2c1d13313823925ce71f992d0a011 (patch)
tree3680a1aaa5b3e3a6eb33fbd13c04809aadb99f5b /build.lisp
parent44473d9af1cb8920157eb39d5943d1728b1627a1 (diff)
added build script
Diffstat (limited to 'build.lisp')
-rw-r--r--build.lisp27
1 files changed, 27 insertions, 0 deletions
diff --git a/build.lisp b/build.lisp
new file mode 100644
index 0000000..60a9b6a
--- /dev/null
+++ b/build.lisp
@@ -0,0 +1,27 @@
+
+(ql:quickload :imbricate)
+
+(defpackage #:imbricate.run
+ (:use #:cl))
+
+(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~%~%"))
+
+
+#+sbcl
+(progn
+ (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)))
+
+ (sb-ext:save-lisp-and-die #p"imbricate" :toplevel #'main :executable t))
+