Dotfiles for different machines on different branches.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
838 B

  1. #!/bin/bash
  2. # copying tex templates
  3. latexdir=~/gitrepos/main/latextemplates/
  4. [ -z "$2" ] && echo "missing argument: filename (no ending)" && return 1
  5. articletemp=${latexdir}latex_article/article.tex
  6. beamertemp=${latexdir}latex_beamer/beamer.tex
  7. exercisetemp=${latexdir}latex_exercise_header/header.tex
  8. handouttemp=${latexdir}latex_handout/handout.tex
  9. case "$1" in
  10. a*) cp "$articletemp" $2.tex ;;
  11. b*) cp "$beamertemp" $2.tex ;;
  12. e*) cp "$exercisetemp" $2.tex ;;
  13. h*) cp "$handouttemp" $2.tex ;;
  14. *) cat << EOF
  15. Allowed options
  16. article NAME get article-template with given NAME
  17. beamer NAME get beamer-template with given NAME
  18. exercise NAME get exercise-template with given NAME
  19. handout NAME get handout-template with given NAME
  20. All of these commands can be truncated,
  21. i.e. \`textemp a\` for \`textemp article`\.
  22. EOF
  23. esac