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.

27 lines
890 B

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