summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/checksum.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py
index 9e5e32b3b7..f927d2d922 100644
--- a/lib/spack/spack/cmd/checksum.py
+++ b/lib/spack/spack/cmd/checksum.py
@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import argparse
import re
import sys
@@ -67,11 +66,18 @@ def setup_parser(subparser):
modes_parser.add_argument(
"--verify", action="store_true", default=False, help="verify known package checksums"
)
- subparser.add_argument("package", help="package or spec. for example cmake or cmake@3.18")
+ subparser.add_argument("package", help="name or spec (e.g. `cmake` or `cmake@3.18`)")
subparser.add_argument(
- "versions", nargs=argparse.REMAINDER, help="versions to generate checksums for"
+ "versions",
+ nargs="*",
+ help="checksum these specific versions (if omitted, Spack searches for remote versions)",
)
arguments.add_common_arguments(subparser, ["jobs"])
+ subparser.epilog = (
+ "examples:\n"
+ " `spack checksum zlib@1.2` autodetects versions 1.2.0 to 1.2.13 from the remote\n"
+ " `spack checksum zlib 1.2.13` checksums exact version 1.2.13 directly without search\n"
+ )
def checksum(parser, args):