scripts: Switch to more portable Perl shebang
authorKamil Rytarowski <n54@gmx.com>
Wed, 26 Apr 2017 13:16:04 +0000 (15:16 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 10 May 2017 07:19:24 +0000 (10:19 +0300)
The default NetBSD package manager is pkgsrc and it installs Perl
along other third party programs under custom and configurable prefix.
The default prefix for binary prebuilt packages is /usr/pkg, and the
Perl executable lands in /usr/pkg/bin/perl.

This change switches "/usr/bin/perl" to "/usr/bin/env perl" as it's
the most portable solution that should work for almost everybody.
Perl's executable is detected automatically.

This change switches -w option passed to the executable with more
modern "use warnings;" approach. There is no functional change to the
default behavior.

Signed-off-by: Kamil Rytarowski <n54@gmx.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
scripts/checkpatch.pl
scripts/clean-header-guards.pl
scripts/cleanup-trace-events.pl
scripts/disas-objdump.pl
scripts/get_maintainer.pl
scripts/shaderinclude.pl
scripts/switch-timer-api
scripts/texi2pod.pl

index f0845429342a926aa4691eefefcad92e174ca25f..3bb6fc95bd8b5304fbe5d73314feaf28b7da8647 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # (c) 2001, Dave Jones. (the file handling bit)
 # (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit)
 # (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite)
@@ -6,6 +6,7 @@
 # Licensed under the terms of the GNU GPL License version 2
 
 use strict;
+use warnings;
 
 my $P = $0;
 $P =~ s@.*/@@g;
index 54ab99ae2919201c7471e90d1d6e5e8f3be6cfd3..5e67f1998cba6c13b55d713b095e4b87841c08d0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 # Clean up include guards in headers
 #
@@ -28,6 +28,7 @@
 #   "cc -E -DGUARD_H -c -P -", and fed the test program on stdin.
 
 use strict;
+use warnings;
 use Getopt::Std;
 
 # Stuff we don't want to clean because we import it into our tree:
index 7e808efb6ac152089732d3f5387a60bd67d9ba65..e93abc00da2edb59218f826db7041f3a5ac1b231 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # Copyright (C) 2013 Red Hat, Inc.
 #
 # Authors:
index 8f7e8182a1b3c83a9b1da85ae2221d6742b65c1a..bec905f04b906915eb8308ba03a023370b203f53 100755 (executable)
@@ -1,4 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
+
+use warnings;
 
 use File::Temp qw/ tempfile /;
 use Getopt::Long;
index 8261bcb1adc0e6d2a53c5965c5d2bd03dc639831..d7c231112334a7144ec751b6c348c2019252baab 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # (c) 2007, Joe Perches <joe@perches.com>
 #           created from checkpatch.pl
 #
@@ -11,6 +11,7 @@
 # Licensed under the terms of the GNU GPL License version 2
 
 use strict;
+use warnings;
 
 my $P = $0;
 my $V = '0.26';
index 81b5146332f847aea3ba237b1c229bccf1eac3d3..cd3bb40b12ff818662a3f51a3cd718f1850dd15a 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 use strict;
 use warnings;
 
index b0e230b9f1d619ca1b8c411909d5af4b1389c8fe..41736d11dd752d6aeb561b92e5871dc0594d3f63 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 use warnings;
index 6e8fec41a17dd34e457b0f08423106b1f2c178ce..39ce584a322d4a51942befadc32b0024ac6d7d48 100755 (executable)
@@ -1,4 +1,4 @@
-#! /usr/bin/perl -w
+#! /usr/bin/env perl
 
 #   Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
 
@@ -22,6 +22,8 @@
 # markup to Perl POD format.  It's intended to be used to extract
 # something suitable for a manpage from a Texinfo document.
 
+use warnings;
+
 $output = 0;
 $skipping = 0;
 %sects = ();