bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38043: [PATCH 1/6] py-compile: clean up usage info


From: Mike Frysinger
Subject: bug#38043: [PATCH 1/6] py-compile: clean up usage info
Date: Sun, 6 Feb 2022 01:57:09 -0500

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.
---
 lib/py-compile        | 8 +++++++-
 t/py-compile-usage.sh | 4 ++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/lib/py-compile b/lib/py-compile
index 0597c85b2147..4917cfed008c 100755
--- a/lib/py-compile
+++ b/lib/py-compile
@@ -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 94c0c4c9d7ba..f324ec9e6d52 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
 
-- 
2.34.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]