[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] scripts: rewrite dcgen in shellscript
From: |
Rob Landley |
Subject: |
Re: [PATCH] scripts: rewrite dcgen in shellscript |
Date: |
Wed, 29 May 2024 03:12:26 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 |
On 5/27/24 11:21, Pádraig Brady wrote:
> I agree that sed is a better dependency than perl,
> however one of the big advantages that perl has is portability.
Is there a second implementation of perl yet (ala ph7 for php and mruby for ruby
and so on), or are you saying the one magic implementation the devs themselves
couldn't clone (hence perl 6 becoming part of Roku or some such) is "portable"
the way microsoft word and microsoft excel were "universal"?
Internet Explorer got replaced with Google Chrome, which is nominally open
source and theoretically portable to a bunch of systems. Would you be
comfortable with a hard dependency on chrome if it was "development only"?
> I.e. there are many variants of sed which might conflict
> with the GNU sed assumed here.
>
> For both these reasons, I'd be slightly against applying this at present.
I'm probably a bit biased here:
https://lkml.iu.edu/hypermail/linux/kernel/1302.3/01520.html
More or less because:
http://lists.landley.net/pipermail/toybox-landley.net/2020-July/011898.html
> BTW in regard to ensuring GNU sed is invoked, supporting overriding
> the called sed with a $SED env var would be useful.
20 years ago;
http://lists.busybox.net/pipermail/busybox/2004-January/044644.html
(Meanwhile https://github.com/landley/toybox/issues/461 is because I didn't
initially notice because the eldrich horror that is autoconf traverses the $PATH
to find a _second_ instance of commands to silently use the wrong one if it
decides it doesn't like the first one, and thus I need to redesign my test
environment to to lie to autoconf and hide data from it EVEN HARDER...)
> Another observation of the script, is that it would be more efficient
> to present multiple commands to a single sed invocation,
> rather than repeatedly invoking the sed command.
Looks like you can just sed -e "blah" -e "blah" -e "blah" it?
Rob