aboutsummaryrefslogtreecommitdiffhomepage
path: root/run.lisp
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-10-28 14:49:12 -0500
committerColin Okay <colin@cicadas.surf>2022-10-28 14:49:12 -0500
commit6d2f5539a5d401856e13c87f34daf4f951cc7c6e (patch)
treeb60eb8aa6acf59ebf39a0e2db59355a6b35e6d1e /run.lisp
parent7017fb6cd063075f9c05a92dad8446b27b484a4e (diff)
Add: sample config; destroy playlist; cli startup
Diffstat (limited to 'run.lisp')
-rw-r--r--run.lisp15
1 files changed, 15 insertions, 0 deletions
diff --git a/run.lisp b/run.lisp
new file mode 100644
index 0000000..8961b91
--- /dev/null
+++ b/run.lisp
@@ -0,0 +1,15 @@
+;;;; run.lisp -- starting from the command line
+
+(in-package :vampire)
+
+(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))
+
+(defun run-vampire ()
+ (let ((conf-file (get-option "--config")))
+ (start-vampire (config-from-file conf-file)))
+ (loop while *runningp* do (sleep 1)))