Skip to content

Commit

Permalink
plugins/latex: 2009 was 12 years ago
Browse files Browse the repository at this point in the history
Locate the currently installed edition, instead of transpoting us back to undergrad.
  • Loading branch information
gaelicWizard committed Jan 8, 2022
1 parent b846c86 commit 2fe9e01
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions clean_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ plugins/available/hub.plugin.bash
plugins/available/java.plugin.bash
plugins/available/jekyll.plugin.bash
plugins/available/jump.plugin.bash
plugins/available/latex.plugin.bash
plugins/available/less-pretty-cat.plugin.bash
plugins/available/man.plugin.bash
plugins/available/node.plugin.bash
Expand Down
24 changes: 17 additions & 7 deletions plugins/available/latex.plugin.bash
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
cite about-plugin
about-plugin 'use mactex'
# 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
MACTEX_PATH=/usr/local/texlive/2009/bin/universal-darwin
if [[ -d $MACTEX_PATH ]]; then
pathmunge $MACTEX_PATH after
fi
unset MACTEX_PATH
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_@}"

0 comments on commit 2fe9e01

Please sign in to comment.