-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Jim Meyering on 10/30/2009 2:52 AM: > FYI, this appears to work, both when invoked directly, and when invoked > as "perl gitlog-to-changelog ...", but I'm still on the fence... > Is it worth the ugliness, when invoking with $(PERL) is so easy, and > when the recommended usage is not to run them from the command line. > > diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog > index a0f8a08..7f1880c 100755 > --- a/build-aux/gitlog-to-changelog > +++ b/build-aux/gitlog-to-changelog > @@ -1,7 +1,9 @@ > -#!/usr/bin/perl > +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' > + & eval 'exec /usr/bin/perl -wS "$0" $argv:q' > + if 0;
Wow. That does start to get hairy. But I think a script that can be run by both $(PERL) script and by ./script is worth the patch. Why? Because we should (eventually) support ./script --help, in case someone wonders why we included the script as part of the tarball and doesn't realize that it is normally a maintainer-only tool. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrq1KUACgkQ84KuGfSFAYDftQCgo6t4uX+m+lchRMSHxwBvvwsy AvYAn2JOqS8MkhWWcgDPu6+N2O0ZK4Lc =VuF3 -----END PGP SIGNATURE-----