avoid masking exit code of shell commands
When a variables is declared (with local
or export
) a failing
command is ignored[0]. Changing that so abuild should now error out
properly in more cases.
Also remove 1 pipe that could have prevented an issue recently[1] where
the du
command core dumped but abuild didn't error.
The other pipes were not changed for now since it may be better to use
set -o pipefail
instead. That may require some changes with commands
like grep which use a non-zero exit code to indicate if a match was
found or similar[2].