[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Explicit interpreter paths considered harmful
From: |
Ludovic Courtès |
Subject: |
Explicit interpreter paths considered harmful |
Date: |
Thu, 29 Oct 2009 12:36:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Hello,
A number of maintainer scripts explicitly use ‘#!/usr/bin/perl’ or
similar, but not all systems have Perl at this location (distros such as
NixOS and GoboLinux don’t have it there, and users in general are free
to install it elsewhere anyway.)
Of course it’d be unreasonable to have ‘AC_PATH_PROG([PERL], [perl])’
just so that, say, ‘gitlog-to-changelog’ uses the right interpreter.
Thus, I was thinking of something along the following lines:
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -1,4 +1,7 @@
-#!/usr/bin/perl
+#!/bin/sh
+# Accommodate systems where /usr/bin/perl is not the right path.
+exec perl -x "$0" "$@"
+#!perl
The only assumption it makes is about /bin/sh, but that one seems to be
hard (impossible?) to avoid anyway.
What do you think?
Thanks,
Ludo’.
- Explicit interpreter paths considered harmful,
Ludovic Courtès <=
- Re: Explicit interpreter paths considered harmful, Paolo Bonzini, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Ludovic Courtès, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Paolo Bonzini, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Jim Meyering, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Ludovic Courtès, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Jim Meyering, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Ludovic Courtès, 2009/10/29
- Re: Explicit interpreter paths considered harmful, Simon Josefsson, 2009/10/30
- Re: Explicit interpreter paths considered harmful, Ludovic Courtès, 2009/10/30
Re: Explicit interpreter paths considered harmful, Ludovic Courtès, 2009/10/29