Sime makelike wrapper scripts support

Bernd Petrovitsch bernd at petrovitsch.priv.at
Mon Jan 13 17:09:07 UTC 2020


On 2020-01-13 16:30, Eli Schwartz wrote:
> On 1/13/20 11:04 AM, Bernd Petrovitsch wrote:
>> On 2020-01-13 15:27, Eli Schwartz wrote:
[...]
>> "-e" doesn't buy anthing (and is not on per default) -> 3 bytes less
[...]
> I'm not the one who initially proposed using -e ;) I'm not a fan of -e

No problem - I was just in the "save the last byte" mode;-)

> in the first place: http://mywiki.wooledge.org/BashFAQ/105

Nice but most the examples don't apply in my world (and I'm
almost always using just /bin/dash anyways).
BTW the "pipefail" examples should better mention $PIPESTATUS[] if
one really wants to check individual command in a pipe.
Oh, and the "if" example at the start is blatantly wrong: compare
the output of
bash -ec 'if [ -d /foo ]; then echo true; else echo false; fi'; echo $?
with
bash -ec 'if [ -d / ]; then echo true; else echo false; fi'; echo $?

I'm actually a fan of `set -e` (and even more `set -u`!) but my shell
scripts don't compute (much - if any) - and the to-be-ignored error
cases (read: called programs/scripts) can be counted with the fingers
of one hand;-)
The downside of not using `set -e` is that unchecked errors are usually
silently ignored (and that tends to be overlooked if the output of the
script is only 80 instead of 85 files. If it breaks in between, I see
that I see nothing;-).

[...]
> And apparently they're also too lazy to check in a tiny shellscript to
> their git repository, too. :/

I fear they are too lazy to actually use a git-repo ...

MfG,
	Bernd
-- 
"I dislike type abstraction if it has no real reason. And saving
on typing is not a good reason - if your typing speed is the main
issue when you're coding, you're doing something seriously wrong."
     - Linus Torvalds


More information about the busybox mailing list