]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
py-compile: clean up usage info
authorMike Frysinger <vapier@gentoo.org>
Sun, 6 Feb 2022 04:01:31 +0000 (23:01 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sun, 6 Feb 2022 04:01:31 +0000 (23:01 -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
t/py-compile-usage.sh

index 0597c85b21472d340be5f1a4e4661461c8d2f13a..b5f317f15b8630230080cba089a9752128700355 100755 (executable)
@@ -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
 
index 94c0c4c9d7ba496aa0e59b357ebfb8f1dfee66eb..f324ec9e6d529f8cac06281b3ddc08c6b6346187 100644 (file)
@@ -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