mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-04-28 20:47:46 +02:00
bin: updated textemp script
This commit is contained in:
parent
ec50c1347b
commit
7322a068c2
@ -2,32 +2,32 @@
|
|||||||
# copying latex templates from my template repository
|
# copying latex templates from my template repository
|
||||||
# (not included in the dotfiles)
|
# (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/*
|
articletemp=${latexdir}/article/*
|
||||||
beamertemp=${latexdir}/beamer/*
|
beamertemp=${latexdir}/beamer-minimal/*
|
||||||
exercisetemp=${latexdir}/exercise/*
|
exercisetemp=${latexdir}/exercise/*
|
||||||
handouttemp=${latexdir}/handout/*
|
handouttemp=${latexdir}/handout/*
|
||||||
cvtemp=${latexdir}/cv/*
|
|
||||||
lettertemp=${latexdir}/letter/*
|
lettertemp=${latexdir}/letter/*
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
a*) cp $articletemp . -r && exit;;
|
a|article) cp $articletemp $targetdir -r && exit;;
|
||||||
b*) cp $beamertemp . -r && exit ;;
|
b|beamer) cp $beamertemp $targetdir -r && exit ;;
|
||||||
c*) cp $cvtemp . -r && exit ;;
|
e|exercise) cp $exercisetemp $targetdir -r && exit ;;
|
||||||
e*) cp $exercisetemp . -r && exit ;;
|
h|handout) cp $handouttemp $targetdir -r && exit ;;
|
||||||
h*) cp $handouttemp . -r && exit ;;
|
l|letter) cp $lettertemp $targetdir -r && exit ;;
|
||||||
l*) cp $lettertemp . -r && exit ;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
Allowed options
|
Usage: textemp <option> <target-dir>
|
||||||
article get article-template to current dir
|
|
||||||
beamer get beamer-template to current dir
|
|
||||||
cv get curriculum vitae-template to current dir
|
|
||||||
exercise get exercise-template to current dir
|
|
||||||
handout get handout-template to current dir
|
|
||||||
letter get letter-template to current dir
|
|
||||||
|
|
||||||
All of these commands can be truncated to one character.
|
Allowed options
|
||||||
|
|
||||||
|
a[rticle] get article-template to current dir
|
||||||
|
b[eamer] get beamer-template to current dir
|
||||||
|
e[xercise] get exercise-template to current dir
|
||||||
|
h[andout] get handout-template to current dir
|
||||||
|
l[etter] get letter-template to current dir
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user