[PATCH 1/1] devel/release-checks.sh: added check that 1st NEWS header is tidy

Tomi Ollila tomi.ollila at iki.fi
Mon Feb 18 08:25:27 PST 2013


On Sat, Feb 16 2013, David Bremner <david at tethera.net> wrote:

> Tomi Ollila <tomi.ollila at iki.fi> writes:
>
>> +echo -n "Checking that NEWS header is tidy... "
>> +if [ "`exec sed 's/./=/g; 1q' NEWS`" = "`exec sed '1d; 2q' NEWS`" ]
>
> This patch seems OK to me, although the execs might be a bit overkill
> for a script that is run once ever few months.

You're right. The 2 extra fork(2):s(*) here doesn't matter...

In case you don't amend my patch in following weeks I'll send
a new patch :)

> d

(*) FYI: It is only bash(1) which forks process to execute the external
command in such a trivial cases. Most (if not all) other shells have
(conservative) heuristics to avoid the "extra" fork there. If you're
interested, my simple way to test this is 'strace -ff -o pidc cmd args...'

Tomi


More information about the notmuch mailing list