Makefile
changeset 78 c014474497f0
parent 77 46f5f10ec084
child 79 a7d0fff4bef0
--- a/Makefile	Wed May 12 14:26:16 2010 +0300
+++ b/Makefile	Wed May 12 14:43:55 2010 +0300
@@ -50,7 +50,20 @@
 
 .PHONY: uninstall
 uninstall:
-	rm -f $(HOME)/.mailsign
+	for item in $(OVERRIDDEN_ITEMS); do \
+		if [ -f $$item ]; then \
+			[ -f $(HOME)/$$file ] && rm -f $(HOME)/$$item; \
+		fi; \
+		if [ -d $$item ]; then \
+			for file in `find $$item -depth`; do \
+				if [ -d $$file ]; then \
+					rmdir $(HOME)/$$file || :; \
+					continue; \
+				fi; \
+				[ -f $(HOME)/$$file ] && rm $(HOME)/$$file; \
+			done; \
+		fi; \
+	done
 
 .PHONY: clean
 clean: