[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Explicit interpreter paths considered harmful
From: |
Simon Josefsson |
Subject: |
Re: Explicit interpreter paths considered harmful |
Date: |
Thu, 05 Nov 2009 16:57:39 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) |
Simon Josefsson <address@hidden> writes:
> Simon Josefsson <address@hidden> writes:
>
>> Sounds great, thank you. Pushed:
>>
>> http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=c9fed5f857a8a6bcce5e276920fd64c43bc5c668
>
> That didn't work fully, since pmccabe2html.m4 did more than just
> checking for awk: it also checked for the pmccabe tool itself. I'm
> adding the patch below.
Even further, this hack doesn't seem to be working:
#!/bin/sh
exec awk -f "$0" "$@"
...
When the script is invoked as 'awk -f SCRIPT' the output is different
from when the script looked like:
#!/usr/bin/awk -f
In particular, with the new approach, the output contains a copy of the
input before the intended output.
Ideas?
I'm considering simply doing the following, since the recommended way to
invoke the awk script is by 'awk -f SCRIPT'. Thoughts?
diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html
index bc0f6e8..b2f35af 100755
--- a/build-aux/pmccabe2html
+++ b/build-aux/pmccabe2html
@@ -1,5 +1,3 @@
-#!/bin/sh
-exec awk -f "$0" "$@"
# pmccabe2html - pmccabe to html converter
# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
/Simon