File: ql.lisp

package info (click to toggle)
pgloader 3.6.10-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,060 kB
  • sloc: sql: 32,321; lisp: 14,793; makefile: 435; sh: 85; python: 26
file content (30 lines) | stat: -rw-r--r-- 1,111 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
;;;
;;; Script used to prepare a pgloader bundle
;;;

;; fetch a list of recent  candidates with
;; (subseq (ql-dist:available-versions (ql-dist:dist "quicklisp")) 0 5)
;;
;; the 2017-06-30 QL release is broken, avoid it.
;;
(defvar *ql-dist* :latest)

(defvar *ql-dist-url-format*
  "http://beta.quicklisp.org/dist/quicklisp/~a/distinfo.txt")

(let ((pkgs (append '("pgloader" "buildapp")
                    (getf (read-from-string
                           (uiop:read-file-string
                            (uiop:merge-pathnames* "pgloader.asd" *pwd*)))
                          :depends-on)))
      (dist (if (or (eq :latest *ql-dist*)
                    (string= "latest" *ql-dist*))
                (cdr
                 ;; available-versions is an alist of (date . url), and the
                 ;; first one is the most recent one
                 (first
                  (ql-dist:available-versions (ql-dist:dist "quicklisp"))))
                (format nil *ql-dist-url-format* *ql-dist*))))
  (ql-dist:install-dist dist :prompt nil :replace t)
  (ql:bundle-systems pkgs :to *bundle-dir*))
(quit)