From 304e88022ae56c5d26dc6faa30527b66ace2080d Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Fri, 28 Jan 2011 21:10:04 -0800 Subject: [PATCH] minimal-do: deal with 'clean.do' operations better. Sometimes clean.do implementations want to delete our .do_built file and directory. If that happens, deal with it quietly, as long as they don't request any *additional* redo-type operations. --- minimal/do | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/minimal/do b/minimal/do index f3e1ab9..fbf5725 100755 --- a/minimal/do +++ b/minimal/do @@ -110,7 +110,7 @@ _do() echo "do: $TARGET: no .do file" >&2 return 1 fi - : >>"$TARGET.did" + [ ! -e "$DO_BUILD" ] || : >>"$TARGET.did" ( _run_dofile "$BASE" "$EXT" "$TARGET.tmp" ) RV=$? if [ $RV != 0 ]; then @@ -147,6 +147,7 @@ fi if [ -n "$DO_TOP" ]; then echo "Removing stamp files..." >&2 + [ ! -e "$DO_BUILT" ] || while read f; do printf "%s.did\0" "$f"; done <"$DO_BUILT" | xargs -0 rm -f 2>/dev/null fi