Files
bash-it/plugins/available/latex.plugin.bash
John D Pell 2fe9e01051 plugins/latex: 2009 was 12 years ago
Locate the currently installed edition, instead of transpoting us back to undergrad.
2022-01-08 08:43:32 -08:00

20 lines
450 B
Bash

# shellcheck shell=bash
about-plugin 'add MacTeX to PATH'
_bash_it_plugin_latex_paths=(
# Standard locations
/usr/local/texbin
# MacOS locations
/Library/TeX/texbin
)
# add mactex to the path if its present
for _bash_it_plugin_latex_path in "${_bash_it_plugin_latex_paths[@]}"; do
if [[ -d "$_bash_it_plugin_latex_path/" ]]; then
pathmunge "$_bash_it_plugin_latex_path" after && break
fi
done
# Cleanup
unset "${!_bash_it_plugin_latex_@}"