2024-10-23 12:12:30 +03:00
|
|
|
#!/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") {
|
2024-10-29 05:12:06 +03:00
|
|
|
$_ = "#!/usr/bin/perl\n";
|
2024-10-23 12:12:30 +03:00
|
|
|
} else {
|
2024-10-29 05:12:06 +03:00
|
|
|
print STDERR "W: Found #!/usr/bin/env $1 and don't know what to substitute\n";
|
2024-10-23 12:12:30 +03:00
|
|
|
}
|
|
|
|
}
|