minimal/do: work around a bug with empty .do files.

If you ". ./filename" and ./filename contains no commands, apparently
ash/dash will give the exit code of the command *before* the ., rather than
defaulting to zero as it supposedly should.  This should work around it in
our .do files at least.

Reported by Tim Allen.
This commit is contained in:
Avery Pennarun 2011-02-28 21:13:55 -08:00
commit 1ed168e79e

View file

@ -90,7 +90,7 @@ _run_dofile()
if [ "$cmd" != "$line1" ]; then
/$cmd "$PWD/$DOFILE" "$@" >"$TARGET.tmp2"
else
. "$PWD/$DOFILE" >"$TARGET.tmp2"
:; . "$PWD/$DOFILE" >"$TARGET.tmp2"
fi
}