mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
collect uri definitions to locations.lisp
This commit is contained in:
parent
9313672133
commit
dbf3030202
|
|
@ -13,7 +13,7 @@ exec ros -Q -m roswell -L sbcl-bin -- $0 "$@"
|
|||
(if (find-package :ros.sub.asdf)
|
||||
(push :ros.sub.asdf *features*)
|
||||
(defpackage :ros.sub.asdf
|
||||
(:use :cl :ros.util)))
|
||||
(:use :cl :ros.util :ros.locations)))
|
||||
|
||||
(in-package :ros.sub.asdf)
|
||||
(ros:quicklisp :environment nil)
|
||||
|
|
@ -23,7 +23,7 @@ exec ros -Q -m roswell -L sbcl-bin -- $0 "$@"
|
|||
(defun asdf-get-version ()
|
||||
(format *error-output* "Checking version to install....~%")
|
||||
(ros.install::github-version
|
||||
"fare" "asdf" (lambda (href) (subseq href (1+ (position #\/ href :from-end t))))))
|
||||
*asdf-git-version-uri* "asdf" (lambda (href) (subseq href (1+ (position #\/ href :from-end t))))))
|
||||
|
||||
(defvar *subcommands*
|
||||
'(("install" . asdf-install)
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@
|
|||
|
||||
(defun ecl-get-version ()
|
||||
(format *error-output* "Checking version to install....~%")
|
||||
(github-version "roswell" "mirror-ecl"
|
||||
(github-version *ecl-git-version-uri* "ecl"
|
||||
(lambda (href)
|
||||
(let ((a (subseq href (1+ (position #\/ href :from-end t)))))
|
||||
(subseq a (position-if #'digit-char-p a))))))
|
||||
|
||||
(defun ecl-version-filename (version)
|
||||
(find-if (lambda (x) (ignore-errors (equal (subseq x (- (length x) (length version))) version)))
|
||||
(github-version "roswell" "mirror-ecl"
|
||||
(github-version *ecl-git-version-uri* "ecl"
|
||||
(lambda (href) (subseq href (1+ (position #\/ href :from-end t)))))))
|
||||
|
||||
(defun ecl-msys (argv)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
(defun sbcl-get-version ()
|
||||
(format *error-output* "Checking version to install....~%")
|
||||
(github-version "sbcl" "sbcl" (lambda (href) (subseq href (1+ (position #\- href :from-end t))))))
|
||||
(github-version *sbcl-git-version-uri* "sbcl" (lambda (href) (subseq href (1+ (position #\- href :from-end t))))))
|
||||
|
||||
(defun sbcl-msys (argv)
|
||||
(unless (or (ros:getenv "MSYSCON")
|
||||
|
|
|
|||
|
|
@ -24,3 +24,7 @@
|
|||
|
||||
(defuri :sbcl-patch1 "https://gist.githubusercontent.com/snmsts/e8e4fd4bd5e458ac45e8/raw/bb7f1cd2e8e9a914f4e9b1b5acf889ecf75dfe0c/posix-tests.patch")
|
||||
(defuri :clisp-patch1 "https://raw.githubusercontent.com/Homebrew/homebrew/2fb8cb1a2279f80dc89900b3ebaca9e5afc90494/Library/Formula/clisp.rb")
|
||||
|
||||
(defuri :ecl-git-version "https://github.com/roswell/mirror-ecl/releases.atom")
|
||||
(defuri :sbcl-git-version "https://github.com/sbcl/sbcl/releases.atom")
|
||||
(defuri :asdf-git-version "https://github.com/fare/asdf/releases.atom")
|
||||
|
|
|
|||
|
|
@ -177,17 +177,6 @@
|
|||
:second 0))
|
||||
;;(parse-date "22-Aug-2015 18:19 ")
|
||||
|
||||
(defun github-version (user project filter)
|
||||
(let ((file (merge-pathnames (format nil "tmp/~A.html" project) (homedir))))
|
||||
(unless (and (probe-file file)
|
||||
(< (get-universal-time) (+ (* 60 60) (file-write-date file))))
|
||||
(download (format nil "https://github.com/~A/~A/releases.atom" user project) file))
|
||||
(nreverse
|
||||
(loop for link in (plump:get-elements-by-tag-name (plump:parse file) "link")
|
||||
for href = (plump:get-attribute link "href")
|
||||
when (eql (aref href 0) #\/)
|
||||
collect (funcall filter href)))))
|
||||
|
||||
(asdf:defsystem :roswell.install.abcl-bin :components ((:file "install-abcl-bin")))
|
||||
(asdf:defsystem :roswell.install.ccl-bin :components ((:file "install-ccl-bin")))
|
||||
(asdf:defsystem :roswell.install.clisp :components ((:file "install-clisp")))
|
||||
|
|
|
|||
|
|
@ -50,3 +50,14 @@
|
|||
(declare (ignore condition))
|
||||
(format t "SIGINT detected, cleaning up the partially installed files~%")
|
||||
(ros:roswell `(,(format nil "deleteing ~A/~A" (getf (cdr param) :target) (getf (cdr param) :version))) :string t)))))))
|
||||
|
||||
(defun github-version (uri project filter)
|
||||
(let ((file (merge-pathnames (format nil "tmp/~A.html" project) (homedir))))
|
||||
(unless (and (probe-file file)
|
||||
(< (get-universal-time) (+ (* 60 60) (file-write-date file))))
|
||||
(download uri file))
|
||||
(nreverse
|
||||
(loop for link in (read-call "plump:get-elements-by-tag-name" (read-call "plump:parse" file) "link")
|
||||
for href = (read-call "plump:get-attribute" link "href")
|
||||
when (eql (aref href 0) #\/)
|
||||
collect (funcall filter href)))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue