diff --git a/lisp/util-install.lisp b/lisp/util-install.lisp index 79b0df8..a3f05f0 100644 --- a/lisp/util-install.lisp +++ b/lisp/util-install.lisp @@ -10,7 +10,7 @@ (defvar *ros-path* nil) (defvar *env* "ROSINSTALL") -(defvar *checkout-default* 'checkout-github) +(defvar *checkout-default* '(checkout-github)) (defun install-impl (impl version argv cmds) "See install-impl-if-probed." @@ -146,7 +146,8 @@ To differentiate it from the system with the same name in quicklisp, the path sh ((install-localpath-if-probed impl/version/tag)) ;;github registerd system like "fukamachi/sblint" checkout (version - (funcall *checkout-default* impl version tag) + (loop for f in *checkout-default* + until (funcall f impl version tag)) (read-call "roswell.util:local-project-build-hash" :rebuild t) (or (let ((project (merge-pathnames (format nil "local-projects/~A/~A/project.lisp" impl version) (roswell.util:checkoutdir)))) diff --git a/lisp/util.lisp b/lisp/util.lisp index 2a2a64f..2487935 100644 --- a/lisp/util.lisp +++ b/lisp/util.lisp @@ -4,7 +4,7 @@ (:import-from :ros :opt :ensure-asdf :*local-project-directories*) (:export :uname :uname-m :homedir :config :impl :which :config-env :checkoutdir - :parse-version-spec :download :expand :sh :chdir :system :module + :parse-version-spec :head :download :expand :sh :chdir :system :module :core-extention :clone-github :opt :read-call :set-opt :copy-dir :roswell-installable-searcher :setenv :unsetenv :ensure-asdf :split-sequence :local-project-build-hash)) @@ -128,6 +128,15 @@ Example: unless c collect i into r finally (return (coerce r 'string)))) +(defun head (uri &key proxy (verbose nil) (output :interactive)) + (declare (ignorable proxy)) + (values + (ignore-errors + (roswell:roswell `("roswell-internal-use" "head" ,(backslash-encode uri) + ,@(when verbose (list verbose))) + output nil) + t))) + (defun download (uri file &key proxy (verbose nil) (output :interactive)) "Interface to curl4 in the roswell C binary" (declare (ignorable proxy))