New way to install latex config

This commit is contained in:
Jeff Lance 2020-08-10 12:45:01 +02:00
parent 72bf391dc6
commit 276be9e2dd
2 changed files with 42 additions and 1 deletions

39
helpers/install_latex.sh Executable file
View File

@ -0,0 +1,39 @@
#!/bin/bash
TEXMF=texmf/tex/latex
if [[ $(uname -s) = Darwin ]]; then
MYTEXMF="$HOME/Library/$TEXMF"
elif [[ $(uname -s) = Linux ]]; then
MYTEXMF="$HOME/$TEXMF"
fi
mkdir -p "$MYTEXMF"
if [[ ! -d "$MYTEXMF/latex-homework" ]]; then
git clone https://src.jefflance.me/jeff/latex-homework.git "$MYTEXMF/latex-homework"
else
git -C "$MYTEXMF/latex-homework" pull
fi
if [[ ! -d "$MYTEXMF/latex-beamer-themes" ]]; then
git clone https://src.jefflance.me/jeff/latex-beamer-themes.git "$MYTEXMF/latex-beamer-themes"
else
git -C "$MYTEXMF/latex-beamer-themes" pull
fi
if [[ ! -d "$MYTEXMF/emerald" ]]; then
git clone https://src.jefflance.me/jeff/emerald.git "$MYTEXMF/emerald"
else
git -C "$MYTEXMF/emerald" pull
fi
if [[ ! -d "$HOME/.asy" ]]; then
git clone https://src.jefflance.me/jeff/asymptote-config.git "$HOME/.asy"
else
git -C "$HOME/.asy" pull
fi
texhash "$MYTEXMF"
exit 0

View File

@ -2,6 +2,8 @@
~/.latexmkrc: confs/latexmkrc
- shell:
- command: 'MYTEXMF=texmf/tex/latex ; [[ $(uname -s) = Darwin ]] && mkdir -p "$HOME/Library/$MYTEXMF" || [[ $(uname -s) = Linux ]] && mkdir -p "$HOME/$MYTEXMF"'
- command: '/bin/bash -c helpers/install_latex.sh'
description: Create latex personal directory
stderr: true
stdout: true