On 25/02/18 09:07, Peter wrote:
> On 25/02/18 19:27, Bastian Blank wrote:
>> On Sat, Feb 24, 2018 at 07:18:32PM -0500, Wietse Venema wrote:
>>> We could add this at the top of the script:
>>>     m4 </dev/null || exit 1
>> Using "set -e" is much more effective and finds all errors.
> Please no.  set -e is an attempt to cover all error cases without
> bailing on commands that return non-zero but aren't errors, therefore it
> has all sorts of crazy rules about what is and isn't an error and much
> of the time will not do what you think it does.  The safe way is to use
> || exit 1 as Wietse said above.  See:
>
> http://mywiki.wooledge.org/BashFAQ/105
>
>
> Peter

I tested both approaches on the case in hand.

set -e does not help, the compilation gives a warning message but
proceeds like the current situation.

Wietse's version stops the compilation in its tracks and so draws your
attention to something that should be addressed.

John

Reply via email to