diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-10-12 17:14:41 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-10-12 22:29:32 +0200 |
commit | 0ad7da1e90d479fa82dbb0cabf858e1b7a120c9d (patch) | |
tree | 904480c200a12ef7101b22287779a6738e671039 /guix/scripts/pull.scm | |
parent | d8907ac43f4bf3314fe3d053e6760de61e8e4a38 (diff) | |
download | gnu-guix-0ad7da1e90d479fa82dbb0cabf858e1b7a120c9d.tar gnu-guix-0ad7da1e90d479fa82dbb0cabf858e1b7a120c9d.tar.gz |
pull: Add '--url' option.
* guix/scripts/pull.scm (%default-options): Add 'tarball-url' pair.
(%options, show-help): Add '--url'.
(guix-pull): Honor it.
Diffstat (limited to 'guix/scripts/pull.scm')
-rw-r--r-- | guix/scripts/pull.scm | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 023b83e6a3..1ee1c91142 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -137,7 +137,7 @@ files." (define %default-options ;; Alist of default option values. - '()) + `((tarball-url . ,%snapshot-url))) (define (show-help) (display (_ "Usage: guix pull [OPTION]... @@ -145,6 +145,8 @@ Download and deploy the latest version of Guix.\n")) (display (_ " --verbose produce verbose output")) (display (_ " + --url=URL download the Guix tarball from URL")) + (display (_ " --bootstrap use the bootstrap Guile to build the new Guix")) (newline) (display (_ " @@ -159,6 +161,10 @@ Download and deploy the latest version of Guix.\n")) (list (option '("verbose") #f #f (lambda (opt name arg result) (alist-cons 'verbose? #t result))) + (option '("url") #t #f + (lambda (opt name arg result) + (alist-cons 'tarball-url arg + (alist-delete 'tarball-url result)))) (option '("bootstrap") #f #f (lambda (opt name arg result) (alist-cons 'bootstrap? #t result))) @@ -182,10 +188,10 @@ Download and deploy the latest version of Guix.\n")) %default-options)) (with-error-handling - (let ((opts (parse-options)) - (store (open-connection))) - (let ((tarball (download-to-store store %snapshot-url - "guix-latest.tar.gz"))) + (let* ((opts (parse-options)) + (store (open-connection)) + (url (assoc-ref opts 'tarball-url))) + (let ((tarball (download-to-store store url "guix-latest.tar.gz"))) (unless tarball (leave (_ "failed to download up-to-date source, exiting\n"))) (parameterize ((%guile-for-build |