X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=debian%2Ftg2quilt.mk;h=4ec27e27e12028fcd1a14aba4e951b0659e5b2fb;hb=cdaae5df1d8ccbd1d6d7faa56b6f38ebb2943b68;hp=66e9d4123ac0ab758c334ebea0e64819f387b308;hpb=27b380077d91f2b35456d5a7a9fbb5c3b457ab5e;p=topgit.git 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; \