(require 'asdf) (asdf:load-system :pastiche) (defun get-option (name &optional default) (or (let* ((args (uiop:command-line-arguments)) (pos (position name args :test #'string-equal))) (or (nth (1+ pos) args) default)))) (defun run () (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)