diff options
Diffstat (limited to 'build.lisp')
-rw-r--r-- | build.lisp | 28 |
1 files changed, 17 insertions, 11 deletions
@@ -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) |