threads / patch / 44007

patchAvoid hard-coded perl path in sha-bang

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

## tl;dr

2 messages between Sep 5, 2016 and Sep 5, 2016. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

iblis· Sep 5, 2016, 15:28 UTC · lore
Signed-off-by: Iblis Lin <iblis@hs.ntnu.edu.tw>
---
  contrib/diff-highlight/diff-highlight | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to contrib/diff-highlight/diff-highlight +1 −2
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· Sep 5, 2016, 19:41 UTC · re: iblis · lore

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

On Mon, Sep 05, 2016 at 11:28:18PM +0800, iblis wrote:
Show 15 quoted lines
> 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

← back to recent threads