# [PATCH] Avoid hard-coded perl path in sha-bang

2 messages from 2016-09-05 to 2016-09-05. Participants: iblis, brian m. carlson.
Thread: https://gitlist.dev/t/44007

## iblis, 2016-09-05 15:28

Subject: [PATCH] Avoid hard-coded perl path in sha-bang
Message-ID: <ddf84da5-036f-6e4f-839d-cef1f7ede4be@hs.ntnu.edu.tw>
URL: https://gitlist.dev/e/ddf84da5-036f-6e4f-839d-cef1f7ede4be%40hs.ntnu.edu.tw
In-Reply-To: <01020156faf163db-3a2e9796-3b12-43d2-90dd-2b843896a5b7-000000@eu-west-1.amazonses.com>

```
Signed-off-by: Iblis Lin <iblis@hs.ntnu.edu.tw>

---
  contrib/diff-highlight/diff-highlight | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/diff-highlight/diff-highlight b/contrib/diff-highlight/diff-highlight
index ffefc31..b57b0fd 100755
--- a/contrib/diff-highlight/diff-highlight
+++ b/contrib/diff-highlight/diff-highlight
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
  
  use 5.008;
  use warnings FATAL => 'all';


--

Iblis Lin


```

## brian m. carlson, 2016-09-05 19:41

Subject: Re: [PATCH] Avoid hard-coded perl path in sha-bang
Message-ID: <20160905194115.wn7uo2fnzolms6uy@vauxhall.crustytoothpaste.net>
URL: https://gitlist.dev/e/20160905194115.wn7uo2fnzolms6uy%40vauxhall.crustytoothpaste.net
In-Reply-To: <ddf84da5-036f-6e4f-839d-cef1f7ede4be@hs.ntnu.edu.tw>

```
On Mon, Sep 05, 2016 at 11:28:18PM +0800, iblis wrote:
> Signed-off-by: Iblis Lin <iblis@hs.ntnu.edu.tw>
> 
> ---
>  contrib/diff-highlight/diff-highlight | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/contrib/diff-highlight/diff-highlight b/contrib/diff-highlight/diff-highlight
> index ffefc31..b57b0fd 100755
> --- a/contrib/diff-highlight/diff-highlight
> +++ b/contrib/diff-highlight/diff-highlight
> @@ -1,4 +1,4 @@
> -#!/usr/bin/perl
> +#!/usr/bin/env perl
>  use 5.008;
>  use warnings FATAL => 'all';

This isn't consistent with what the other contrib scripts do, and
/usr/bin/env perl isn't always the right perl for all situations.  What
you probably want is to do something like this, which is listed in the
Makefile.

# Individual rules to allow e.g.
# "make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script"
# from subdirectories like contrib/*/
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204

```
