Don't check for existence of source file/dir as find return only existing ones.
--- a/Makefile Wed May 12 14:19:12 2010 +0300
+++ b/Makefile Wed May 12 14:26:16 2010 +0300
@@ -24,11 +24,10 @@
if [ -d $$item ]; then \
for file in `find $$item`; do \
if [ -d $$file ]; then \
- [ -d $(HOME)/$$file ] || mkdir -p $(HOME)/$$file; \
+ mkdir -p $(HOME)/$$file; \
+ continue; \
fi; \
- if [ -f $$file ]; then \
- install -m 640 $$file $(HOME)/$$file; \
- fi; \
+ install -m 640 $$file $(HOME)/$$file; \
done; \
fi; \
done
@@ -39,9 +38,10 @@
if [ -d $$item ]; then \
for file in `find $$item`; do \
if [ -d $$file ]; then \
- [ -d $(HOME)/$$file ] || mkdir -p $(HOME)/$$file; \
+ mkdir -p $(HOME)/$$file; \
+ continue; \
fi; \
- if [ -f $$file -a ! -f $(HOME)/$$file ]; then \
+ if [ ! -f $(HOME)/$$file ]; then \
install -m 640 $$file $(HOME)/$$file; \
fi; \
done; \