ciel/scripting.lisp
vindarel 442aa60439 Add scripting support!
Just run

$ ciel myscript.lisp

where you can use all the available libraries.
2022-12-09 15:01:07 +01:00

20 lines
465 B
Common Lisp

(in-package :ciel)
(defun main ()
"Run a lisp file as a script.
If no file is given or if it doesn't exist, run the top-level CIEL REPL.
It should begin with:
(in-package :ciel-user)
Exciting things to come!"
;; (format t "Hello main! ~S~&" uiop:*command-line-arguments*)
(let ((file (first (uiop:command-line-arguments))))
(cond
((and file
(uiop:file-exists-p file))
(load file))
(t
(sbcli::repl)))))