From f8bf6e55c2ea49ac0b3299a30034f349f1776ea2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 5 Mar 2009 10:19:05 +0100 Subject: [PATCH] make removing quilt patches dir more robust MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This way errors only occur if something goes really wrong, so don't feed to /dev/null and don't ignore non-zero exit status. Signed-off-by: Uwe Kleine-König Acked-by: martin f. krafft --- debian/tg2quilt.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/tg2quilt.mk b/debian/tg2quilt.mk index 66e9d41..4ec27e2 100644 --- a/debian/tg2quilt.mk +++ b/debian/tg2quilt.mk @@ -122,7 +122,7 @@ else # remove the series file test -f $(QUILT_PATCH_DIR)/series && rm $(QUILT_PATCH_DIR)/series || : # try to remove directories - find $(QUILT_PATCH_DIR) -type d | tac | xargs rmdir 2>/dev/null || : + find $(QUILT_PATCH_DIR) -depth -type d -empty -execdir rmdir {} + # fail if the directory could not be removed and still exists @test ! -d $(QUILT_PATCH_DIR) || { \ echo "E: $(QUILT_PATCH_DIR) contains non-TopGit-generated files:" >&2; \ -- 2.30.2