diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-11-03 21:19:43 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-11-03 21:19:43 +0100 |
commit | cdd5d6f95f416078509bce509b25c7c854da34a2 (patch) | |
tree | 41801084dc6c6b461d4b87192f1c581b08dbc60e /guix-download.in | |
parent | 00e219d1c98e55dd1b6c6af00ae73c23ed52583e (diff) | |
download | patches-cdd5d6f95f416078509bce509b25c7c854da34a2.tar patches-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.in | 6 |
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"))))) ;;; |