From 6022e47b19161375fd2159299def5c76c915956d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 25 Jun 2021 18:09:21 +0200 Subject: Fix bugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- texlive-bin/Makefile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'texlive-bin') 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 -- cgit v1.2.3-70-g09d2