diff --git a/.local/bin/tools/textemp b/.local/bin/tools/textemp index 46c0b95..e62ff7e 100755 --- a/.local/bin/tools/textemp +++ b/.local/bin/tools/textemp @@ -2,32 +2,32 @@ # copying latex templates from my template repository # (not included in the dotfiles) -[ -z "$LATEX_TEMPLATE_DIR" ] && latexdir="~/code/main/latextemplates" || latexdir="$LATEX_TEMPLATE_DIR" +latexdir=${LATEX_TEMPLATE_DIR:-~/code/main/latextemplates} + +targetdir=${2:-.} articletemp=${latexdir}/article/* -beamertemp=${latexdir}/beamer/* +beamertemp=${latexdir}/beamer-minimal/* exercisetemp=${latexdir}/exercise/* handouttemp=${latexdir}/handout/* -cvtemp=${latexdir}/cv/* lettertemp=${latexdir}/letter/* case "$1" in - a*) cp $articletemp . -r && exit;; - b*) cp $beamertemp . -r && exit ;; - c*) cp $cvtemp . -r && exit ;; - e*) cp $exercisetemp . -r && exit ;; - h*) cp $handouttemp . -r && exit ;; - l*) cp $lettertemp . -r && exit ;; + a|article) cp $articletemp $targetdir -r && exit;; + b|beamer) cp $beamertemp $targetdir -r && exit ;; + e|exercise) cp $exercisetemp $targetdir -r && exit ;; + h|handout) cp $handouttemp $targetdir -r && exit ;; + l|letter) cp $lettertemp $targetdir -r && exit ;; esac cat << EOF +Usage: textemp