aboutsummaryrefslogtreecommitdiff
path: root/guix-download.in
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-11-03 21:19:43 +0100
committerLudovic Courtès <ludo@gnu.org>2012-11-03 21:19:43 +0100
commitcdd5d6f95f416078509bce509b25c7c854da34a2 (patch)
tree41801084dc6c6b461d4b87192f1c581b08dbc60e /guix-download.in
parent00e219d1c98e55dd1b6c6af00ae73c23ed52583e (diff)
downloadguix-cdd5d6f95f416078509bce509b25c7c854da34a2.tar
guix-cdd5d6f95f416078509bce509b25c7c854da34a2.tar.gz
ui: Factorize `--version'.
* guix/ui.scm (show-version-and-exit): New procedure. * guix-build.in (show-version): Remove. (%options)["version"]: Use `show-version-and-exit'. * guix-download.in: Likewise. * guix-package.in: Likewise.
Diffstat (limited to 'guix-download.in')
-rw-r--r--guix-download.in6
1 files changed, 1 insertions, 5 deletions
diff --git a/guix-download.in b/guix-download.in
index b574c962b4..8d4a8bb055 100644
--- a/guix-download.in
+++ b/guix-download.in
@@ -88,9 +88,6 @@ exec ${GUILE-@GUILE@} -L "@guilemoduledir@" -l "$0" \
;; Alist of default option values.
`((format . ,bytevector->nix-base32-string)))
-(define (show-version)
- (display "guix-download (@PACKAGE_NAME@) @PACKAGE_VERSION@\n"))
-
(define (show-help)
(display (_ "Usage: guix-download [OPTION]... URL
Download the file at URL, add it to the store, and print its store path
@@ -131,8 +128,7 @@ Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
(exit 0)))
(option '(#\V "version") #f #f
(lambda args
- (show-version)
- (exit 0)))))
+ (show-version-and-exit "guix-download")))))
;;;