History

scripts: Switch to more portable Perl shebang

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. While there, drop "require 5" from scripts/namespace.pl (Perl from 1994?).

Kamil Rytarowski committed 9 years ago

Commit cb77f0d1 parent 2ea659a24 files · +37 −25Browse files

Showing the changes to scripts/checkpatch.pl (1 of 24 files). Show all

Unified · Split

scripts/checkpatch.pl+2−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/perl -w
1+#!/usr/bin/env perl
22 # (c) 2001, Dave Jones. (the file handling bit)
33 # (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit)
44 # (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite)
@@ -6,6 +6,7 @@ · 1 unmodified line
66 # Licensed under the terms of the GNU GPL License version 2
77
88 use strict;
9+use warnings;
910 use POSIX;
1011 use File::Basename;
1112 use Cwd 'abs_path';