1
0
linux/debian/bin/fix-shebang
Konstantin Demin c3d09a3e94 initial commit
imported from https://salsa.debian.org/kernel-team/linux.git
commit 9d5cc9d9d6501d7f1dd7e194d4b245bd0b6c6a22
version 6.11.4-1
2024-10-23 12:12:30 +03:00

13 lines
398 B
Perl
Executable File

#!/usr/bin/perl -pi
# Change "#!/usr/bin/env perl" to "#!/usr/bin/perl" (policy §10.4).
# Other uses of /usr/bin/env should probably be converted as well, but
# policy doesn't specify what to do.
if ($. == 1 && m|^\#!\s*/usr/bin/env\s+(.+)|) {
if ($1 eq "perl") {
$_ = "#!/usr/bin/perl\n";
} else {
print STDERR "W: Found #!/usr/bin/env $1 and don't know what to substitute\n";
}
}