From 2e8c3d805690fce6d19fffb4ba024e1989c18825 Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 11 Aug 2024 20:37:54 -0700 Subject: Fixes --- build.lisp | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'build.lisp') diff --git a/build.lisp b/build.lisp index 98920ea..a883eaa 100644 --- a/build.lisp +++ b/build.lisp @@ -4,21 +4,27 @@ (defun get-option (name &optional default) (or - (let ((args (uiop:command-line-arguments))) - (when-let ((pos (position name args :test #'string-equal))) - (nth (1+ pos) args))) - default)) + (let* ((args (uiop:command-line-arguments)) + (pos (position name args :test #'string-equal))) + (or (nth (1+ pos) args) + default)))) (defun run () - (let ((config-path (get-option "--config"))) - (truname config-path) - (pastiche::load-config config-path) - (pastiche::start) - (loop (sleep 30)))) + (format t "STARTING PASTICHE~%") + (handler-case + (let ((config-path (get-option "--config"))) + (truename config-path) + (format t "LOADING CONFIG ~%") + (pastiche::load-config config-path) + (format t "STARTING PASTICHE") + (pastiche::start)) + (error (e) + (format *error-output* "~a~%" e) + (uiop:quit))) + (loop (sleep 30))) (ensure-directories-exist #P"./bin/") (sb-ext:save-lisp-and-die "bin/pastiche" :toplevel #'run - :executable t - :compression t) + :executable t) -- cgit v1.2.3