diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-02-05 23:01:31 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-02-05 23:01:31 -0500 |
commit | faa1d2c5cb09be9ff5c65f97a8312834a78c762a (patch) | |
tree | 34c09b19dee58b714ae61d11335cd18a78c2d2f0 | |
parent | c54a2154001cf9cc0837ded6411d88584ea07c39 (diff) | |
download | automake-faa1d2c5cb09be9ff5c65f97a8312834a78c762a.tar.gz |
py-compile: clean up usage info
Include the full summary of options in the output.
* lib/py-compile: Update usage output.
* t/py-compile-usage.sh: Update test to match new output.
-rwxr-xr-x | lib/py-compile | 10 | ||||
-rw-r--r-- | t/py-compile-usage.sh | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/py-compile b/lib/py-compile index 0597c85b2..b5f317f15 100755 --- a/lib/py-compile +++ b/lib/py-compile @@ -1,7 +1,7 @@ #!/bin/sh # py-compile - Compile a Python program -scriptversion=2021-02-27.01; # UTC +scriptversion=2022-02-06.04; # UTC # Copyright (C) 2000-2022 Free Software Foundation, Inc. @@ -62,13 +62,19 @@ while test $# -ne 0; do ;; -h|--help) cat <<\EOF -Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." +Usage: py-compile [options] FILES... Byte compile some python scripts FILES. Use --destdir to specify any leading directory path to the FILES that you don't want to include in the byte compiled file. Specify --basedir for any additional path information you do want to be shown in the byte compiled file. +Options: + --basedir DIR Prefix all FILES with DIR, and include in error messages. + --destdir DIR Prefix all FILES with DIR before compiling. + -v, --version Display version information. + -h, --help This help screen. + Example: py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py diff --git a/t/py-compile-usage.sh b/t/py-compile-usage.sh index 94c0c4c9d..f324ec9e6 100644 --- a/t/py-compile-usage.sh +++ b/t/py-compile-usage.sh @@ -29,8 +29,8 @@ cp "$am_scriptdir/py-compile" . \ cat stdout test -s stderr && { cat stderr >&2; exit 1; } grep '^Usage: py-compile .' stdout -$FGREP ' [--basedir DIR]' stdout -$FGREP ' [--destdir DIR]' stdout +$FGREP ' --basedir DIR ' stdout +$FGREP ' --destdir DIR ' stdout # --version |