X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/dce832a25d7cbc27d69802bee8d0af9a9cb4f71d..e1871e5609099b07b473df5d9afef8069ff38aed:/packages/texlive/build.sh diff --git a/packages/texlive/build.sh b/packages/texlive/build.sh index d556991c..7f2f472b 100644 --- a/packages/texlive/build.sh +++ b/packages/texlive/build.sh @@ -56,15 +56,17 @@ termux_step_make() { termux_step_create_debscripts () { # Clean texlive's folder if needed (run on upgrade) - echo "if [ ! -f $TERMUX_PREFIX/opt/texlive/2016/install-tl -a ! -f $TERMUX_PREFIX/opt/texlive/2017/install-tl ]; then exit 0; else echo 'Removing residual files from old version of TeX Live for Termux'; fi" > preinst + echo "#!$TERMUX_PREFIX/bin/sh" > preinst + echo "if [ ! -f $TERMUX_PREFIX/opt/texlive/2016/install-tl -a ! -f $TERMUX_PREFIX/opt/texlive/2017/install-tl ]; then exit 0; else echo 'Removing residual files from old version of TeX Live for Termux'; fi" >> preinst echo "rm -rf $TERMUX_PREFIX/etc/profile.d/texlive.sh" >> preinst echo "rm -rf $TERMUX_PREFIX/opt/texlive/2016" >> preinst # Let's not delete the previous texmf-dist so that people who have installed a full distribution won't need to download everything again echo "rm -rf $TERMUX_PREFIX/opt/texlive/2017/!(texmf-dist)" >> preinst echo "exit 0" >> preinst chmod 0755 preinst - - echo "mkdir -p $TL_ROOT/{tlpkg/{backups,tlpobj},texmf-var/{web2c,tex/generic/config}}" > postinst + + echo "#!$TERMUX_PREFIX/bin/sh" > postinst + echo "mkdir -p $TL_ROOT/{tlpkg/{backups,tlpobj},texmf-var/{web2c,tex/generic/config}}" >> postinst echo "export PATH=\$PATH:$TL_BINDIR" >> postinst echo "echo Updating tlmgr" >> postinst echo "tlmgr update --self" >> postinst @@ -84,7 +86,8 @@ termux_step_create_debscripts () { chmod 0755 postinst # Remove all files installed through tlmgr on removal - echo 'if [ $1 != "remove" ]; then exit 0; fi' > prerm + echo "#!$TERMUX_PREFIX/bin/sh" > prerm + echo 'if [ $1 != "remove" ]; then exit 0; fi' >> prerm #echo "tlmgr remove --dry-run " echo "echo Running texlinks --unlink" >> prerm echo "texlinks --unlink" >> prerm