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-build.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-build.in')
-rw-r--r-- | guix-build.in | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/guix-build.in b/guix-build.in index 961545b146..c7bcb38975 100644 --- a/guix-build.in +++ b/guix-build.in @@ -71,9 +71,6 @@ When SOURCE? is true, return the derivations of the package sources." `((system . ,(%current-system)) (substitutes? . #t))) -(define (show-version) - (display "guix-build (@PACKAGE_NAME@) @PACKAGE_VERSION@\n")) - (define (show-help) (display (_ "Usage: guix-build [OPTION]... PACKAGE-OR-DERIVATION... Build the given PACKAGE-OR-DERIVATION and return their output paths.\n")) @@ -113,8 +110,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-build"))) (option '(#\S "source") #f #f (lambda (opt name arg result) |