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 -w1#!/usr/bin/env perl
2# (c) 2001, Dave Jones. (the file handling bit)2# (c) 2001, Dave Jones. (the file handling bit)
3# (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit)3# (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit)
4# (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite)4# (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite)
@@ -6,6 +6,7 @@ · 1 unmodified line
6# Licensed under the terms of the GNU GPL License version 26# Licensed under the terms of the GNU GPL License version 2
7 7
8use strict;8use strict;
9use warnings;
9use POSIX;10use POSIX;
10use File::Basename;11use File::Basename;
11use Cwd 'abs_path';12use Cwd 'abs_path';