From b3602e85d8c625e8ffc08855b67c0ae11169a5f3 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 30 Oct 2009 15:02:02 +0100 Subject: perl scripts: remove #!/usr/bin/perl in favor of more portable... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rather than putting #!/usr/bin/perl on the first line, start with a variant of what's recommended by "man perlrun" that invokes the first "perl" program from your shell's search path. * build-aux/gitlog-to-changelog: Replace #!... as above. Add a "Local Variables" perl mode setting. Prompted by a patch from Ludovic Courtès. Improved by Eric Blake. * build-aux/useless-if-before-free: Likewise. * build-aux/announce-gen: Likewise. * build-aux/update-copyright: Likewise. --- build-aux/useless-if-before-free | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'build-aux/useless-if-before-free') diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free index abcdef2cda..793c9753e0 100755 --- a/build-aux/useless-if-before-free +++ b/build-aux/useless-if-before-free @@ -1,4 +1,6 @@ -#!/usr/bin/perl -T +eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}' + & eval 'exec perl -wST "$0" $argv:q' + if 0; # Detect instances of "if (p) free (p);". # Likewise for "if (p != NULL) free (p);". And with braces. # Also detect "if (NULL != p) free (p);". @@ -197,6 +199,7 @@ When modifying files, refuse to process anything other than a regular file. EOF ## Local Variables: +## mode: perl ## indent-tabs-mode: nil ## eval: (add-hook 'write-file-hooks 'time-stamp) ## time-stamp-start: "my $VERSION = '" -- cgit v1.2.1