snow-fort-windows-installer/get-archive-urls.scm

30 lines
765 B
Scheme

(import (scheme base)
(scheme read)
(scheme write)
(scheme file)
(scheme process-context))
(define repository (with-input-from-file "repo.scm" (lambda () (read))))
(define baseurl "https://snow-fort.org")
(define packager-is-srfi?
(lambda (package)
(let ((is-srfi? #f))
(for-each
(lambda (item)
(when (and (equal? (car item) 'library)
(equal? (car (cadr (assoc 'name item))) 'srfi))
(set! is-srfi? #t)))
(cdr package))
is-srfi?)))
(for-each
(lambda (item)
(when (and (equal? (car item) 'package)
(not (packager-is-srfi? item)))
(display baseurl)
(display (cadr (assoc 'url item)))
(newline)))
(cdr repository))