Don't install script when 'ros install' called recursive way.

This commit is contained in:
SANO Masatoshi 2017-06-18 03:42:06 +09:00
parent 2eed7aa84c
commit 3385803303
2 changed files with 6 additions and 4 deletions

View file

@ -35,7 +35,6 @@
(defun roswell-installable-searcher (system-name)
(let ((name (roswell-installed-system-name system-name))
(env "ROSINSTALL")
pname)
(and
name
@ -43,13 +42,12 @@
(asdf:find-system pname nil)))
(prog1
(or (quicklisp-client:local-projects-searcher name)
(unless (find system-name (loop for ar = (ros:getenv env) then (subseq ar (1+ p))
(unless (find system-name (loop for ar = (ros:getenv "ROSINSTALL") then (subseq ar (1+ p))
for p = (position #\, ar)
for arg = (if p (subseq ar 0 p) ar)
collect arg
while p)
:test 'equal)
(roswell.util:setenv env (format nil "~A,~A" system-name (ros:getenv env)))
(roswell:roswell `("install" ,system-name))
(quicklisp-client:register-local-projects)
(quicklisp-client:local-projects-searcher name))

View file

@ -9,6 +9,7 @@
(in-package :roswell.install)
(defvar *ros-path* nil)
(defvar *env* "ROSINSTALL")
(defvar *checkout-default* 'checkout-github)
(defun install-impl (impl version argv cmds)
@ -43,7 +44,8 @@
(defun install-system-if-probed (imp)
(let ((result (or (read-call "ql-dist:find-system" imp)
(read-call "ql:where-is-system" imp))))
(when result
(when (and result
(= 1 (count #\, (ros:getenv *env*))))
(funcall 'install-system-script imp)
result)))
@ -114,6 +116,7 @@
with *ros-path* = (make-pathname :defaults (opt "argv0"))
with _
with changed
with envold = (ros:getenv *env*)
for impl/version/tag = (first argv)
for pos = (position #\/ impl/version/tag)
for impl = (if pos (subseq impl/version/tag 0 pos) impl/version/tag)
@ -122,6 +125,7 @@
for version = (if pos2 (subseq version/tag 0 pos2) version/tag)
for tag = (when pos2 (subseq version/tag (1+ pos2)))
do (setf argv (rest argv))
(setenv *env* (format nil "~A,~A" impl/version/tag envold))
(cond
;;registerd implementations like sbcl ccl-bin abcl etc
((setf (values _ argv) (install-impl-if-probed impl version/tag argv)))