dotfiles/helpers/install_latex.sh

40 lines
972 B
Bash
Raw Normal View History

2020-08-10 10:45:01 +00:00
#!/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
2021-02-19 17:58:08 +00:00
git -C "$MYTEXMF/latex-homework" pull --no-rebase
2020-08-10 10:45:01 +00:00
fi
if [[ ! -d "$MYTEXMF/latex-beamer-themes" ]]; then
git clone https://src.jefflance.me/jeff/latex-beamer-themes.git "$MYTEXMF/latex-beamer-themes"
else
2021-02-19 17:58:08 +00:00
git -C "$MYTEXMF/latex-beamer-themes" pull --no-rebase
2020-08-10 10:45:01 +00:00
fi
if [[ ! -d "$MYTEXMF/emerald" ]]; then
git clone https://src.jefflance.me/jeff/emerald.git "$MYTEXMF/emerald"
else
2021-02-19 17:58:08 +00:00
git -C "$MYTEXMF/emerald" pull --no-rebase
2020-08-10 10:45:01 +00:00
fi
if [[ ! -d "$HOME/.asy" ]]; then
git clone https://src.jefflance.me/jeff/asymptote-config.git "$HOME/.asy"
else
2021-02-19 17:58:08 +00:00
git -C "$HOME/.asy" pull --no-rebase
2020-08-10 10:45:01 +00:00
fi
texhash "$MYTEXMF"
2021-02-19 17:58:08 +00:00
exit 0