From 1ed168e79e05c7382d35fba2f4fa6db127df2d38 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Mon, 28 Feb 2011 21:13:55 -0800 Subject: [PATCH] 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. --- minimal/do | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minimal/do b/minimal/do index 901e4f3..3c17ac8 100755 --- a/minimal/do +++ b/minimal/do @@ -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 }