aboutsummaryrefslogtreecommitdiffstats
path: root/claws-mail/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'claws-mail/Makefile')
-rw-r--r--claws-mail/Makefile18
1 files changed, 11 insertions, 7 deletions
diff --git a/claws-mail/Makefile b/claws-mail/Makefile
index 8a3b141..45df08c 100644
--- a/claws-mail/Makefile
+++ b/claws-mail/Makefile
@@ -5,15 +5,19 @@ install:
mkdir -p -- ~/.claws-mail
test ! -d ~/.claws-mail/clawsrc
ln -sf -- ~/.dotfiles/claws-mail/clawsrc ~/.claws-mail/clawsrc
- if test -e Mail; then \
- test -d ~/Mail && \
- test ! -e ~/.var/mail && \
- mkdir -p -- ~/.var && \
- mv -- ~/Mail ~/.var/mail; \
+ if test -L ~/Mail; then \
+ test "$$(readlink -- ~/Mail)" = .var/mail; \
else \
- mkdir -p -- ~/.var/mail; \
+ if test -e ~/Mail; then \
+ test -d ~/Mail && \
+ test ! -e ~/.var/mail && \
+ mkdir -p -- ~/.var && \
+ mv -- ~/Mail ~/.var/mail; \
+ else \
+ mkdir -p -- ~/.var/mail; \
+ fi; \
+ ln -sf -- .var/mail ~/Mail; \
fi
- ln -sf -- .var/mail ~/Mail
test -e ~/.hidden && grep '^Mail$$' < ~/.hidden || printf '%s\n' "Mail" >> ~/.hidden
uninstall: