aboutsummaryrefslogtreecommitdiffstats
path: root/texlive-bin/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-06-25 18:09:21 +0200
committerMattias Andrée <maandree@kth.se>2021-06-25 18:09:21 +0200
commit6022e47b19161375fd2159299def5c76c915956d (patch)
treea863536cd6bf4b5c607ea00993e5666602ef8fd5 /texlive-bin/Makefile
parentAdd instructions to README (diff)
downloaddotfiles-6022e47b19161375fd2159299def5c76c915956d.tar.gz
dotfiles-6022e47b19161375fd2159299def5c76c915956d.tar.bz2
dotfiles-6022e47b19161375fd2159299def5c76c915956d.tar.xz
Fix bugs
Signed-off-by: Mattias Andrée <maandree@kth.se>
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