aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--claws-mail/Makefile4
-rw-r--r--emacs/Makefile15
-rw-r--r--filesystem/Makefile8
-rw-r--r--python/Makefile3
-rw-r--r--texlive-bin/Makefile17
5 files changed, 29 insertions, 18 deletions
diff --git a/claws-mail/Makefile b/claws-mail/Makefile
index 0c431e4..8a3b141 100644
--- a/claws-mail/Makefile
+++ b/claws-mail/Makefile
@@ -14,12 +14,12 @@ install:
mkdir -p -- ~/.var/mail; \
fi
ln -sf -- .var/mail ~/Mail
- test -e ~/.hidden && grep '^Mail$' < ~/.hidden || printf '%s\n' "Mail" >> ~/.hidden
+ test -e ~/.hidden && grep '^Mail$$' < ~/.hidden || printf '%s\n' "Mail" >> ~/.hidden
uninstall:
-unlink -- ~/.claws-mail/clawsrc
-rmdir -- ~/.claws-mail
-unlink -- ~/Mail
- -test ! -e ~/.hidden || grep -v '^Mail$' < ~/.hidden | sponge ~/.hidden
+ -test ! -e ~/.hidden || grep -v '^Mail$$' < ~/.hidden | sponge ~/.hidden
.PHONY: install uninstall
diff --git a/emacs/Makefile b/emacs/Makefile
index beebde0..23f2aa3 100644
--- a/emacs/Makefile
+++ b/emacs/Makefile
@@ -3,13 +3,18 @@ include ../common.mk
install:
mkdir -p -- ~/.config
- if test -d ~/.emacs.d; then \
- test ! -e ~/.config/emacs && \
- mv -- ~/.emacs.d ~/.config/emacs; \
+ if test -L ~/.emacs.d; then \
+ test "$$(readlink -- ~/.emacs.d)" = .config/emacs; \
else \
- mkdir -p -- ~/.config/emacs; \
+ set -e; \
+ if test -d ~/.emacs.d; then \
+ test ! -e ~/.config/emacs; \
+ mv -- ~/.emacs.d ~/.config/emacs; \
+ else \
+ mkdir -p -- ~/.config/emacs; \
+ fi; \
+ ln -sf -- .config/emacs ~/.emacs.d; \
fi
- ln -sf -- .config/emacs ~/.emacs.d
printf '; %s\n\n' 'This file is generated by ~/.dotfiles/emacs/Makefile' > ~/.config/emacs/init.el
cat -- init.el >> ~/.config/emacs/init.el
if $(CHECK_INSTALLED) emacs-go-mode 2>/dev/null; then\
diff --git a/filesystem/Makefile b/filesystem/Makefile
index bc3fd71..456b51c 100644
--- a/filesystem/Makefile
+++ b/filesystem/Makefile
@@ -30,9 +30,9 @@ install:
rm -f -- ~/.spool
rm -f -- ~/.local/var
ln -sf .var/spool/ ~/.spool
- ln -sf ../.var ~/.local/var
mkdir -p -- ~/.local/bin
mkdir -p -- ~/.local/src
+ ln -sf ../.var ~/.local/var
if test -d ~/.fonts && test ! -L ~/.fonts; then \
mkdir -p -- ~/.local/share && \
test ! -e ~/.local/share/fonts && \
@@ -68,10 +68,10 @@ install:
mkdir -p -- ~/.usr/src
ln -sf -- ~/.dotfiles/filesystem/user-dirs.dirs ~/.config/
set -e && for f in $(HIDE); do \
- test -e ~/.hidden && grep '^'"$$f"'$' < ~/.hidden || printf '%s\n' "$$f" >> ~/.hidden; \
+ test -e ~/.hidden && grep '^'"$$f"'$$' < ~/.hidden || printf '%s\n' "$$f" >> ~/.hidden; \
done
if test "$$(hostname | tr '[[:upper:]]' '[[:lower:]]')" = zenith; then \
- test -e ~/.hidden && grep '^cryptokey.gpg$' < ~/.hidden || printf '%s\n' "cryptokey.gpg" >> ~/.hidden; \
+ test -e ~/.hidden && grep '^cryptokey.gpg$$' < ~/.hidden || printf '%s\n' "cryptokey.gpg" >> ~/.hidden; \
fi
uninstall:
@@ -107,7 +107,7 @@ uninstall:
-rmdir -- ~/.usr/src
-rmdir -- ~/.usr
-for f in $(HIDE) cryptokey.gpg; do \
- test ! -e ~/.hidden || grep -v '^'"$$f"'$' < ~/.hidden | sponge ~/.hidden; \
+ test ! -e ~/.hidden || grep -v '^'"$$f"'$$' < ~/.hidden | sponge ~/.hidden; \
done
.PHONY: install uninstall
diff --git a/python/Makefile b/python/Makefile
index 400a366..271827a 100644
--- a/python/Makefile
+++ b/python/Makefile
@@ -3,7 +3,8 @@ include ../common.mk
install:
mkdir -p -- ~/.var/cache
- ln -sf .var/cache/python_history ~/
+ test ! -d ~/.python_history
+ ln -sf .var/cache/python_history ~/.python_history
mkdir -p -- ~/.config/profile.d
test ! -d ~/.config/profile.d/python
ln -sf -- ~/.dotfiles/python/user-profile ~/.config/profile.d/python
diff --git a/texlive-bin/Makefile b/texlive-bin/Makefile
index e3ba852..bd4f7e9 100644
--- a/texlive-bin/Makefile
+++ b/texlive-bin/Makefile
@@ -2,14 +2,19 @@
include ../common.mk
install:
- if test -d ~/.texlive; then \
- test ! -d ~/.var/cache/texlive && \
- mkdir -p -- ~/.var/cache && \
- mv ~/.texlive ~/.var/cache/texlive; \
+ if test -L ~/.texlive; then \
+ test "$$(readlink -- ~/.texlive)" = .var/cache/texlive; \
else \
- mkdir -p -- ~/.var/cache/texlive; \
+ set -e; \
+ if test -d ~/.texlive; then \
+ test ! -d ~/.var/cache/texlive && \
+ mkdir -p -- ~/.var/cache && \
+ mv ~/.texlive ~/.var/cache/texlive; \
+ else \
+ mkdir -p -- ~/.var/cache/texlive; \
+ fi; \
+ ln -sf -- .var/cache/texlive ~/.texlive; \
fi
- ln -sf -- .var/cache/texlive ~/.texlive
uninstall:
-rm -rf -- ~/.var/cache/texlive