summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1b79e7f..56e5bae 100644
--- a/Makefile
+++ b/Makefile
@@ -99,7 +99,7 @@ ifdef VERBOSE
endif
-.PHONY: help clean_except_last clean_bases clean_all
+.PHONY: help clean_except_last clean_bases clean_all clean_failed
help:
@@ -170,6 +170,18 @@ clean_except_last:
| xargs -r -0 -n1 rm -rf; )
+clean_failed:
+ @-$(foreach template,$(TEMPLATES),\
+ test -d $(template) && \
+ find $(template)/* \
+ -maxdepth 0 \
+ -type d \
+ -not -name base \
+ -print0 \
+ | xargs -r -0 -n1 -i \
+ $(SHELL) -c 'test -d "{}/build" || rm -rf "{}"')
+
+
clean_bases:
@-$(foreach template,$(TEMPLATES),\
test -d $(template) && rm -rf $(template)/base;)