From cdd5d6f95f416078509bce509b25c7c854da34a2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 3 Nov 2012 21:19:43 +0100 Subject: 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. --- guix-download.in | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'guix-download.in') 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"))))) ;;; -- cgit 1.4.1