introduce module

This commit is contained in:
SANO Masatoshi 2016-12-11 17:36:38 +09:00
parent cd96ba3058
commit ff0d4cb4d6
3 changed files with 10 additions and 10 deletions

View file

@ -24,11 +24,7 @@ ARGV2 contains a (possibly modified) ARGV.")
(defvar *checkout-default* 'checkout-github)
(defun probe-impl (impl)
(or (ignore-errors
(let ((imp (format nil "roswell.install.~A" impl)))
(and (or (read-call "ql-dist:find-system" imp)
(read-call "ql:where-is-system" imp))
(read-call "ql:quickload" imp :silent t))))
(or (module "install" impl)
(and ;; before setup quicklisp
(find impl '("sbcl-bin" "quicklisp") :test 'equal)
(load (make-pathname :name (format nil "install-~A" impl) :type "lisp" :defaults *load-pathname*)))))

View file

@ -8,7 +8,4 @@
(defun probe-run-script (impl)
(ignore-errors
(quicklisp-client:register-local-projects)
(let ((imp (format nil "roswell.run.~A" impl)))
(and (or (ql-dist:find-system imp)
(ql:where-is-system imp))
(ql:quickload imp :silent t)))))
(module "run" impl)))

View file

@ -6,7 +6,7 @@
(:use :cl)
(:import-from :ros :opt)
(:export :uname :uname-m :homedir :config :use :impl :which :list%
:parse-version-spec :download :expand :sh :chdir :system
:parse-version-spec :download :expand :sh :chdir :system :module
:core-extention :clone-github :opt :read-call :set-opt :copy-dir))
(in-package :ros.util)
@ -30,6 +30,13 @@
(merge-pathnames l path)
(ensure-directories-exist (merge-pathnames l to)))))))
(defun module (prefix name)
(ignore-errors
(let ((imp (format nil "roswell.~A.~A" prefix impl)))
(and (or (read-call "ql-dist:find-system" imp)
(read-call "ql:where-is-system" imp))
(read-call "ql:quickload" imp :silent t)))))
(defun set-opt (item val)
(let ((found (assoc item (ros::ros-opts) :test 'equal)))
(if found