This commit is contained in:
SANO Masatoshi 2022-11-27 01:56:35 +09:00
parent 921d445cff
commit dae5e63c7b
5 changed files with 18 additions and 5 deletions

View file

@ -11,7 +11,7 @@
(let ((file (merge-pathnames "tmp/abcl-bin.html" (homedir))))
(format *error-output* "Checking version to install....~%")
(download (abcl-bin-uri) file)
(loop for a in (plump:get-elements-by-tag-name
(loop for a in (get-elements-by-tag-name
(plump:parse file) "a")
for x = (string-right-trim "/" (plump:get-attribute a "href"))
when (ignore-errors (digit-char-p (aref x 0)))

View file

@ -11,7 +11,7 @@
(let ((file (merge-pathnames "tmp/clisp.html" (homedir))))
(format *error-output* "Checking version to install....~%")
(download (clisp-version-uri) file :interval (* 60 60))
(loop for link in (plump:get-elements-by-tag-name (plump:parse file) "a")
(loop for link in (get-elements-by-tag-name (plump:parse file) "a")
for href = (plump:get-attribute link "href") for len = (1- (length href))
when (and (eql (aref href len) #\/)
(not (eql (aref href 0) #\/))

View file

@ -7,7 +7,7 @@
(let ((file (merge-pathnames "tmp/cmu-bin.html" (homedir))))
(format *error-output* "Checking version to install...~%")
(download (format nil "~Arelease/" (cmu-bin-uri)) file :interval (* 60 60))
(loop for link in (plump:get-elements-by-tag-name (plump:parse file) "a")
(loop for link in (get-elements-by-tag-name (plump:parse file) "a")
for href = (plump:get-attribute link "href")
for len = (length href)
when (and (digit-char-p (aref href 0))

View file

@ -5,6 +5,18 @@
(defvar *build-hook* nil)
(defun get-elements-by-tag-name (node tag)
(let* ((current-version
(ignore-errors
(let* ((* "plump")
(* (ql-dist:find-system *))
(* (ql-dist:dist *))
(* (ql-dist:version *)))
*)))
(new (string< "2022-07-08" current-version)))
(funcall (if new #'nreverse #'identity)
(plump:get-elements-by-tag-name node tag))))
#+sbcl
(defclass count-line-stream (sb-gray:fundamental-character-output-stream)
((base :initarg :base

View file

@ -5,7 +5,8 @@
:install-system-script :install-impl-if-probed :install-script-if-probed
:install-system-if-probed :mingw-namestring :install-github :*checkout-default*
:install :decide-version :decide-download :require-system-package
:start :setup :date :github-version :version :install-script :count-line-stream))
:start :setup :date :github-version :version :install-script :count-line-stream
:get-elements-by-tag-name))
(in-package :roswell.install)
(defvar *ros-path* nil)
@ -77,7 +78,7 @@ To differentiate it from the system with the same name in quicklisp, the path sh
(download uri file :interval (* 60 60))
(read-call "plump:parse" file))))
(nreverse
(loop for link in (read-call "plump:get-elements-by-tag-name" elts "link")
(loop for link in (read-call "roswell.install:get-elements-by-tag-name" elts "link")
for href = (read-call "plump:get-attribute" link "href")
when (funcall filter href)
collect it))))