automake-commit
[Top][All Lists]
Advanced

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

[automake-commit] branch master updated: py-compile: clean up usage info


From: Mike Frysinger
Subject: [automake-commit] branch master updated: py-compile: clean up usage info
Date: Mon, 07 Feb 2022 21:37:03 -0500

This is an automated email from the git hooks/post-receive script.

vapier pushed a commit to branch master
in repository automake.

View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=faa1d2c5cb09be9ff5c65f97a8312834a78c762a

The following commit(s) were added to refs/heads/master by this push:
     new faa1d2c5c py-compile: clean up usage info
faa1d2c5c is described below

commit faa1d2c5cb09be9ff5c65f97a8312834a78c762a
Author: Mike Frysinger <vapier@gentoo.org>
AuthorDate: Sat Feb 5 23:01:31 2022 -0500

    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.
---
 lib/py-compile        | 10 ++++++++--
 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
 



reply via email to

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