Created
June 20, 2018 01:32
-
-
Save ebarojas/832e4c5fc3caca6d134d9396bdf6cca1 to your computer and use it in GitHub Desktop.
Install Latex from shell with packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-#!/bin/sh | |
-# This is legacy code | |
-# Latex Install, the prescript way! | |
-echo "Installing wget" | |
-sudo apt-get install -y wget | |
- | |
-echo "*******************************************" | |
-echo "Installing Latex 2016 " | |
-echo "*******************************************" | |
-cd /vagrant/config | |
- | |
-# if you need a fresh installing make sure you dont have text live from apt-get | |
-# purge your install before | |
-# https://tex.stackexchange.com/questions/95483/how-to-remove-everything-related-to-tex-live-for-fresh-install-on-ubuntu | |
-# sudo apt-get purge texlive* | |
-# change 2016 for the year you have installed | |
-# rm -rf /usr/local/texlive/2016 and rm -rf ~/.texlive2016 | |
-# rm -rf /usr/local/share/texmf | |
-# rm -rf /var/lib/texmf | |
-# rm -rf /etc/texmf | |
-# sudo apt-get remove tex-common --purge | |
-# rm -rf ~/.texlive | |
- | |
-mkdir ./tmp | |
-cd ./tmp | |
-echo "Download tl unix ..." | |
-wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz | |
- | |
-tar --strip-components=1 -xzf install-tl-unx.tar.gz -C . | |
- | |
-echo "Download latex profile ..." | |
-wget https://raw.githubusercontent.com/Prescrypto/heroku-buildpack-tex/master/conf/texlive.profile | |
- | |
-echo "Installing..." | |
-sudo ./install-tl --profile=texlive.profile | |
- | |
- | |
-echo "*******************************************" | |
-echo " Update path " | |
-echo "*******************************************" | |
-echo 'PATH="/usr/local/texlive/2016/bin/x86_64-linux:$PATH"' >> ~/.profile | |
-source ~/.profile | |
- | |
-echo "LaTeX Installed" | |
-tex --version | |
- | |
-echo "*******************************************" | |
-echo "Install texlive packages " | |
-echo "*******************************************" | |
-cd /vagrant/ | |
-sudo env PATH="$PATH" tlmgr install $(cat texlive.packages) | |
- | |
-echo "Installed Latex with Packages!!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment