automake-commit
[Top][All Lists]
Advanced

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

[automake-commit] branch master updated: cosmetics: py-compile consisten


From: Karl Berry
Subject: [automake-commit] branch master updated: cosmetics: py-compile consistently use test, not [ ... ]; indentation.
Date: Mon, 26 Jul 2021 21:04:04 -0400

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

karl 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=badd7d25de18685c92759e1629dcf7a7ceb7d484

The following commit(s) were added to refs/heads/master by this push:
     new badd7d2  cosmetics: py-compile consistently use test, not [ ... ]; 
indentation.
badd7d2 is described below

commit badd7d25de18685c92759e1629dcf7a7ceb7d484
Author: Karl Berry <karl@freefriends.org>
AuthorDate: Mon Jul 26 18:03:53 2021 -0700

    cosmetics: py-compile consistently use test, not [ ... ]; indentation.
    
    * lib/py-compile: consistently use test rather than [ ... ];
    use consistent sh indentation; check exit status consistently.
---
 lib/py-compile | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/py-compile b/lib/py-compile
index c45a77d..81b122b 100755
--- a/lib/py-compile
+++ b/lib/py-compile
@@ -1,7 +1,7 @@
 #!/bin/sh
 # py-compile - Compile a Python program
 
-scriptversion=2020-02-19.23; # UTC
+scriptversion=2021-02-27.01; # UTC
 
 # Copyright (C) 2000-2021 Free Software Foundation, Inc.
 
@@ -27,7 +27,7 @@ scriptversion=2020-02-19.23; # UTC
 # bugs to <bug-automake@gnu.org> or send patches to
 # <automake-patches@gnu.org>.
 
-if [ -z "$PYTHON" ]; then
+if test -z "$PYTHON"; then
   PYTHON=python
 fi
 
@@ -96,23 +96,23 @@ done
 
 files=$*
 if test -z "$files"; then
-    usage_error "no files given"
+  usage_error "no files given"
 fi
 
 # if basedir was given, then it should be prepended to filenames before
 # byte compilation.
-if [ -z "$basedir" ]; then
-    pathtrans="path = file"
+if test -z "$basedir"; then
+  pathtrans="path = file"
 else
-    pathtrans="path = os.path.join('$basedir', file)"
+  pathtrans="path = os.path.join('$basedir', file)"
 fi
 
 # if destdir was given, then it needs to be prepended to the filename to
 # byte compile but not go into the compiled file.
-if [ -z "$destdir" ]; then
-    filetrans="filepath = path"
+if test -z "$destdir"; then
+  filetrans="filepath = path"
 else
-    filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
+  filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
 fi
 
 python_major=`$PYTHON -V 2>&1 | sed -e 's/.* //;s/\..*$//;1q'`
@@ -176,7 +176,7 @@ for file in files.split():
         py_compile.compile(filepath, $import_call(filepath$import_arg2), path)
     else:
         py_compile.compile(filepath, filepath + 'o', path)
-sys.stdout.write('\n')" 2>/dev/null || :
+sys.stdout.write('\n')" 2>/dev/null || exit $?
 
 # Local Variables:
 # mode: shell-script



reply via email to

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