Skip to content

Commit cb77f0d

Browse files
krytarowskimasahir0y
authored andcommitted
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?). Signed-off-by: Kamil Rytarowski <n54@gmx.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
1 parent 2ea659a commit cb77f0d

24 files changed

Lines changed: 37 additions & 25 deletions

scripts/bootgraph.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/perl
1+
#!/usr/bin/env perl
22

33
# Copyright 2008, Intel Corporation
44
#

scripts/checkincludes.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/perl
1+
#!/usr/bin/env perl
22
#
33
# checkincludes: find/remove files included more than once
44
#

scripts/checkpatch.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
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)
55
# (c) 2008-2010 Andy Whitcroft <apw@canonical.com>
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';

scripts/checkstack.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/perl
1+
#!/usr/bin/env perl
22

33
# Check the stack usage of functions
44
#

scripts/checkversion.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /usr/bin/perl
1+
#! /usr/bin/env perl
22
#
33
# checkversion find uses of LINUX_VERSION_CODE or KERNEL_VERSION
44
# without including <linux/version.h>, or cases of

scripts/cleanfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
#!/usr/bin/perl -w
1+
#!/usr/bin/env perl
22
#
33
# Clean a text file -- or directory of text files -- of stealth whitespace.
44
# WARNING: this can be a highly destructive operation. Use with caution.
55
#
66

7+
use warnings;
78
use bytes;
89
use File::Basename;
910

scripts/cleanpatch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
#!/usr/bin/perl -w
1+
#!/usr/bin/env perl
22
#
33
# Clean a patch file -- or directory of patch files -- of stealth whitespace.
44
# WARNING: this can be a highly destructive operation. Use with caution.
55
#
66

7+
use warnings;
78
use bytes;
89
use File::Basename;
910

scripts/dtc/dt_to_config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/perl
1+
#!/usr/bin/env perl
22

33
# Copyright 2016 by Frank Rowand
44
# Copyright 2016 by Gaurav Minocha

scripts/export_report.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/perl -w
1+
#!/usr/bin/env perl
22
#
33
# (C) Copyright IBM Corporation 2006.
44
# Released under GPL v2.
@@ -7,6 +7,7 @@
77
# Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c
88
#
99

10+
use warnings;
1011
use Getopt::Std;
1112
use strict;
1213

scripts/extract-module-sig.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/perl -w
1+
#!/usr/bin/env perl
22
#
33
# extract-mod-sig <part> <module-file>
44
#
@@ -12,6 +12,7 @@
1212
# -k: Just the key ID
1313
# -s: Just the crypto signature or PKCS#7 message
1414
#
15+
use warnings;
1516
use strict;
1617

1718
die "Format: $0 -[0adnks] module-file >out\n"

0 commit comments

Comments
 (0)