lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [lmi-commits] odd/multiarch 768d4fc 4/7: Impede executing a sc


From: Vadim Zeitlin
Subject: Re: [lmi] [lmi-commits] odd/multiarch 768d4fc 4/7: Impede executing a script that should instead be sourced
Date: Fri, 26 Apr 2019 00:13:28 +0200

On Thu, 25 Apr 2019 17:54:22 -0400 (EDT) Greg Chicares <address@hidden> wrote:

GC> branch: odd/multiarch
GC> commit 768d4fcdf97da3237b843b17e73ec05ea61a1675
GC> Author: Gregory W. Chicares <address@hidden>
GC> Commit: Gregory W. Chicares <address@hidden>
GC> 
GC>     Impede executing a script that should instead be sourced
GC>     
GC>     Added an invalid argument to the shebang as suggested by Ingo Karkat.
GC>     The argument he suggests is actually
GC>       source-this-script
GC>     which would cause dash to print
GC>       Can't open source-this-script
GC>     but we prefer to say "free software" rather than "open source".
GC> ---
GC>  set_arch.sh | 2 +-
GC>  1 file changed, 1 insertion(+), 1 deletion(-)
GC> 
GC> diff --git a/set_arch.sh b/set_arch.sh
GC> index 6afbb7b..acf2326 100755
GC> --- a/set_arch.sh
GC> +++ b/set_arch.sh
GC> @@ -1,4 +1,4 @@
GC> -#!/bin/sh
GC> +#!/bin/sh this-script-must-be-sourced-not-run

 This is an interesting hack, but why do we need a hack at all here?
Wouldn't it be better to just remove the shebang line completely and, for
good measure, make the file non-executable?

VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]