blob: e6583e2826a67f6454933fe935b16790cdf3d698 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
;;;; run.lisp -- starting from the command line.
(in-package :oneliners.api)
(defun get-option (name &optional default)
(or
(let ((args (uiop:command-line-arguments)))
(a:when-let ((pos (position name args :test #'string-equal)))
(nth (1+ pos) args)))
default))
(defun run ()
(a:if-let ((conf-file (get-option "--config")))
(start-from-config conf-file)
(start-from-config))
(loop while *runningp* do (sleep 10)))
|