aboutsummaryrefslogtreecommitdiffstats
path: root/texlive-bin/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--texlive-bin/Makefile17
1 files changed, 11 insertions, 6 deletions
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