debian/bin/fix-shebang
raw| 1 | #!/usr/bin/perl -pi |
| 2 | |
| 3 | # Change "#!/usr/bin/env perl" to "#!/usr/bin/perl" (policy ยง10.4). |
| 4 | # Other uses of /usr/bin/env should probably be converted as well, but |
| 5 | # policy doesn't specify what to do. |
| 6 | if ($. == 1 && m|^\#!\s*/usr/bin/env\s+(.+)|) { |
| 7 | if ($1 eq "perl") { |
| 8 | $_ = "#!/usr/bin/perl\n"; |
| 9 | } else { |
| 10 | print STDERR "W: Found #!/usr/bin/env $1 and don't know what to substitute\n"; |
| 11 | } |
| 12 | } |