[SCM] Git repository for devscripts branch, master, updated. v2.11.6-18-g1d83778
James McCoy
jamessan at debian.org
Sat May 5 16:10:06 UTC 2012
The following commit has been merged in the master branch:
commit 097c92302c32dfe80c19949c7dc107a6181c4b86
Author: Raphael Geissert <geissert at debian.org>
Date: Thu Apr 19 23:07:59 2012 -0500
checkbashisms: do not unconditionally swallow stdin
diff --git a/scripts/checkbashisms.pl b/scripts/checkbashisms.pl
index 2c995cd..bc89d3b 100755
--- a/scripts/checkbashisms.pl
+++ b/scripts/checkbashisms.pl
@@ -50,16 +50,6 @@ my ($opt_echo, $opt_force, $opt_extra, $opt_posix);
my ($opt_help, $opt_version);
my @filenames;
-# Detect if STDIN is a pipe
-if (-p STDIN or -f STDIN) {
- my ($tmp_fh, $tmp_filename) = tempfile("chkbashisms_tmp.XXXX", TMPDIR => 1, UNLINK => 1);
- while (my $line = <STDIN>) {
- print $tmp_fh $line;
- }
- close($tmp_fh);
- push(@ARGV, $tmp_filename);
-}
-
##
## handle command-line options
##
@@ -79,6 +69,16 @@ if ($opt_version) { print $version; exit 0; }
$opt_echo = 1 if $opt_posix;
+# Detect if STDIN is a pipe
+if (scalar(@ARGV) == 0 && (-p STDIN or -f STDIN)) {
+ my ($tmp_fh, $tmp_filename) = tempfile("chkbashisms_tmp.XXXX", TMPDIR => 1, UNLINK => 1);
+ while (my $line = <STDIN>) {
+ print $tmp_fh $line;
+ }
+ close($tmp_fh);
+ push(@ARGV, $tmp_filename);
+}
+
my $status = 0;
my $makefile = 0;
my (%bashisms, %string_bashisms, %singlequote_bashisms);
--
Git repository for devscripts
More information about the Devscripts-devel
mailing list