diff --git a/recipes/git b/recipes/git index 8e9cfd7..89b32a0 100644 --- a/recipes/git +++ b/recipes/git @@ -13,3 +13,13 @@ case $_PLATFORM in _apt git ;; esac + +function _git { + local repo=$1 + local dest=$2 + if ! test -d "$dest"; then + _run "[git] Clone $repo to $dest" git clone --recursive $1 $2 + else + echo "[git] $dest already exists, skipping." + fi +} diff --git a/recipes/tex b/recipes/tex index 4e129bd..ba17fdb 100644 --- a/recipes/tex +++ b/recipes/tex @@ -23,6 +23,12 @@ function _tex { fi } +function _tex_git { + local pkg=$1 + local repo=$2 + _git $2 "$(kpsewhich -var-value TEXMFHOME)/tex/latex/${pkg}" +} + _tex labbook _tex mdframed _tex microtype @@ -30,3 +36,6 @@ _tex minted _tex moderncv _tex soul _tex tufte-latex + +_recipe git +_tex_git dnd https://github.com/evanbergeron/DND-5e-LaTeX-Template.git