# Clean texlive's folder if needed (run on fresh install)
echo"#!$TERMUX_PREFIX/bin/bash" > preinst
echo"if [ ! -d $PREFIX/opt/texlive ]; then echo 'Removing residual files from old version of TeX Live for Termux'; rm -rf $PREFIX/opt/texlive; fi" >> preinst
# Clean texlive's folder if needed (run on upgrade)
echo"#!$TERMUX_PREFIX/bin/bash" > preinst
echo"if [ -d $TERMUX_PREFIX/opt/texlive ]; then echo 'Removing residual files from old version of TeX Live for Termux'; rm -rf $PREFIX/opt/texlive; fi" >> preinst