diff --git a/Makefile b/Makefile index 0b90164..6f7b3fb 100644 --- a/Makefile +++ b/Makefile @@ -108,4 +108,4 @@ version: .PHONY: clean clean: rm -f '$(IMAGE_TARBALL)' - if [ -d '$(DISTDIR)' ]; then rmdir '$(DISTDIR)'; fi + if [ -d '$(DISTDIR)' ] && [ -z "$$(ls -A '$(DISTDIR)')" ]; then rmdir '$(DISTDIR)'; fi