blob: a883eaafebe50c9a66326010a076667c9316d432 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
(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)
|