mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
25 lines
744 B
Common Lisp
25 lines
744 B
Common Lisp
(ros:include "util" "util-use")
|
|
|
|
(defpackage :ros.use
|
|
(:use :cl :ros.util)
|
|
(:export :use))
|
|
|
|
(in-package :ros.use)
|
|
|
|
(defun use (arg)
|
|
"Parse the lisp version string (such as ccl-bin/1.11) and set it to the correct config slot(s)"
|
|
(destructuring-bind (lisp version) (parse-version-spec arg)
|
|
(cond
|
|
((and arg
|
|
(ignore-errors
|
|
(ros:roswell `("-L" ,arg "version=t" "run"))))
|
|
(cond ((and lisp version)
|
|
(setf (config "default.lisp") lisp
|
|
(config (format nil "~A.version" lisp)) version))
|
|
(lisp
|
|
(setf (config "default.lisp")
|
|
lisp)))
|
|
t)
|
|
(t (let ((func (module "use" lisp)))
|
|
(funcall func version))))))
|