Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1411192
| From | Bernd Petrovitsch <bernd@petrovitsch.priv.at> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: script relative shebang |
| Date | 2016-06-01 15:20 +0200 |
| Message-ID | <rFedX-qG-3@gated-at.bofh.it> (permalink) |
| References | <rEZHX-7YV-1@gated-at.bofh.it> <rF0Xo-s6-13@gated-at.bofh.it> <rF9nY-5Ug-39@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi all!
On Wed, 2016-06-01 at 09:00 +0100, Boris wrote:
[...]
> Yes, I think this is too ugly:
>
> #!/usr/bin/gawk {exit system("/bin/sh -c 'exec \"$(dirname
> \"$0\")\"/subdir/catself \"$0\"' " FILENAME);}
The simplest solution for an application today is to provide a wrapper
script/program (to be placed in /usr/bin or /usr/local/bin) which knows
where to search for the applications executables - if adding some
directories to $PATH is not enough.
> Imagine you have that feature in your kernel would you rather use:
>
> #!{dirname}/subdir/catself
And what if "{dirname}" (or any other character sequence) happens to be
a valid pathname?
> You second advice involves changing root fs which is not desirable in
> copy-deployment apps (bring all the dependencies)
>
> This more about making kernel "user" friendly.
User-friendlyness is not the job of the kernel ...
[ Fullquote deleted as it's a bad habit ]
MfG,
Bernd
--
Bernd Petrovitsch Email : bernd@petrovitsch.priv.at
LUGA : http://www.luga.at
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
script relative shebang Boris Rybalkin <ribalkin@gmail.com> - 2016-05-31 23:50 +0200
Re: script relative shebang Nicolai Stange <nicstange@gmail.com> - 2016-06-01 01:10 +0200
Re: script relative shebang Boris <ribalkin@gmail.com> - 2016-06-01 10:10 +0200
Re: script relative shebang Bernd Petrovitsch <bernd@petrovitsch.priv.at> - 2016-06-01 15:20 +0200
Re: script relative shebang "Austin S. Hemmelgarn" <ahferroin7@gmail.com> - 2016-06-01 17:40 +0200
Re: script relative shebang Boris Rybalkin <ribalkin@gmail.com> - 2016-06-02 02:10 +0200
Re: script relative shebang Ken Moffat <zarniwhoop@ntlworld.com> - 2016-06-02 06:30 +0200
Re: script relative shebang Boris <ribalkin@gmail.com> - 2016-06-03 00:50 +0200
csiph-web