aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-09-13 23:42:36 +0200
committerLudovic Courtès <ludo@gnu.org>2013-09-13 23:42:36 +0200
commit29479de5659ba912b486c74078403bbb9a4df104 (patch)
tree4eabfcf6cc57ba91344ecef4fbf3eed199be8718
parent0cb9b45674b659b4dba7af2e19ab2491af1efecb (diff)
downloadguix-29479de5659ba912b486c74078403bbb9a4df104.tar.gz
guix-29479de5659ba912b486c74078403bbb9a4df104.zip
substitute-binary: Add '--help'.
Reported by Nikita Karetnikov <nikita@karetnikov.org>. * guix/scripts/substitute-binary.scm (show-help): New procedure. (guix-substitute-binary): Add '--help'.
-rwxr-xr-xguix/scripts/substitute-binary.scm30
1 files changed, 29 insertions, 1 deletions
diff --git a/guix/scripts/substitute-binary.scm b/guix/scripts/substitute-binary.scm
index 63f0c4f8d2..1afc93bbc9 100755
--- a/guix/scripts/substitute-binary.scm
+++ b/guix/scripts/substitute-binary.scm
@@ -446,6 +446,30 @@ PORT. REPORT-PROGRESS is a two-argument procedure such as that returned by
;;;
+;;; Help.
+;;;
+
+(define (show-help)
+ (display (_ "Usage: guix substitute-binary [OPTION]...
+Internal tool to substitute a pre-built binary to a local build.\n"))
+ (display (_ "
+ --query report on the availability of substitutes for the
+ store file names passed on the standard input"))
+ (display (_ "
+ --substitute STORE-FILE DESTINATION
+ download STORE-FILE and store it as a Nar in file
+ DESTINATION"))
+ (newline)
+ (display (_ "
+ -h, --help display this help and exit"))
+ (display (_ "
+ -V, --version display version information and exit"))
+ (newline)
+ (show-bug-report-information))
+
+
+
+;;;
;;; Entry point.
;;;
@@ -536,7 +560,11 @@ PORT. REPORT-PROGRESS is a two-argument procedure such as that returned by
(restore-file input destination)
(every (compose zero? cdr waitpid) pids))))
(("--version")
- (show-version-and-exit "guix substitute-binary")))))
+ (show-version-and-exit "guix substitute-binary"))
+ (("--help")
+ (show-help))
+ (opts
+ (leave (_ "~a: unrecognized options~%") opts)))))
;;; Local Variables: