| 1 | export TMPDIR=$PREFIX/tmp/ |
| 2 | cd $TMPDIR |
| 3 | |
| 4 | wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz |
| 5 | tar xvzf install-tl-unx.tar.gz |
| 6 | cd install-tl-*/ |
| 7 | |
| 8 | #patch install-tl |
| 9 | sed -E -i "s@/bin/sh@$PREFIX/bin/sh@" tlpkg/TeXLive/TLUtils.pm |
| 10 | |
| 11 | cat >> texlive_inst.profile << XX |
| 12 | |
| 13 | selected_scheme scheme-custom |
| 14 | TEXDIR $PREFIX/local/texlive/2016 |
| 15 | TEXMFCONFIG ~/.texlive2016/texmf-config |
| 16 | TEXMFHOME ~/texmf |
| 17 | TEXMFLOCAL $PREFIX/local/texlive/texmf-local |
| 18 | TEXMFSYSCONFIG $PREFIX/local/texlive/2016/texmf-config |
| 19 | TEXMFSYSVAR $PREFIX/local/texlive/2016/texmf-var |
| 20 | TEXMFVAR ~/.texlive2016/texmf-var |
| 21 | collection-basic 1 |
| 22 | collection-latex 1 |
| 23 | collection-luatex 1 |
| 24 | in_place 0 |
| 25 | option_adjustrepo 1 |
| 26 | option_autobackup 1 |
| 27 | option_backupdir tlpkg/backups |
| 28 | option_desktop_integration 0 |
| 29 | option_doc 0 |
| 30 | option_file_assocs 0 |
| 31 | option_fmt 1 |
| 32 | option_letter 0 |
| 33 | option_menu_integration 1 |
| 34 | option_path 0 |
| 35 | option_post_code 1 |
| 36 | option_src 0 |
| 37 | option_sys_bin $PREFIX/bin |
| 38 | option_sys_info $PREFIX/local/share/info |
| 39 | option_sys_man $PREFIX/local/share/man |
| 40 | option_w32_multi_user 0 |
| 41 | option_write18_restricted 1 |
| 42 | portable 0 |
| 43 | |
| 44 | XX |
| 45 | |
| 46 | #start installer with a profile and premade binaries |
| 47 | perl ./install-tl --custom-bin=$PREFIX/local/texlive/2016/bin/pkg --profile texlive_inst.profile |
| 48 | |
| 49 | mkdir -p $PREFIX/etc/profile.d/ |
| 50 | |
| 51 | cat > $PREFIX/etc/profile.d/texlive.sh << XX |
| 52 | export PATH=$PATH:$PREFIX/local/texlive/2016/bin/custom |
| 53 | export TMPDIR=$PREFIX/tmp/ |
| 54 | |
| 55 | XX |
| 56 | |
| 57 | #fix tlpkg |
| 58 | sed -E -i "s@/bin/sh@$PREFIX/bin/sh@" $PREFIX/local/texlive/2016/tlpkg/TeXLive/TLUtils.pm |
| 59 | |
| 60 | texlinks |