From: martin f. krafft Date: Fri, 6 Nov 2009 09:17:55 +0000 (+0100) Subject: simplify removal of files in tg-rmdir X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=commitdiff_plain;h=40d5fd8c81f74ef6e7e5e6e51bf21d0493487c32;ds=sidebyside simplify removal of files in tg-rmdir Signed-off-by: martin f. krafft --- diff --git a/debian/tg2quilt.mk b/debian/tg2quilt.mk index c1cc95a..671dc04 100644 --- a/debian/tg2quilt.mk +++ b/debian/tg2quilt.mk @@ -121,9 +121,9 @@ else | xargs grep -l '^tg:') tg-rmdir: # remove all files whose contents matches /^tg:/ - test -n "$(__TG_FILES)" && rm $(__TG_FILES) || : - # remove the series file - test -f $(QUILT_PATCH_DIR)/series && rm $(QUILT_PATCH_DIR)/series || : + rm -f $(__TG_FILES) + # remove the series file + rm -f $(QUILT_PATCH_DIR)/series # try to remove directories find $(QUILT_PATCH_DIR) -depth -type d -empty -execdir rmdir {} + # fail if the directory could not be removed and still exists