3 # Helper script to export LaTeX templates for new documents
4 # Copyright (c) 2009-2022 Benjamin Mako Hill <mako@atdot.cc>
5 # Released under the GPLv3 or later.
7 SOURCEDIR="$HOME/tex/beamer-mako"
13 git checkout-index -f --prefix=$CURDIR/$1/ $(find template -not -type d)
16 # get rid of paper_template subdir
18 mv $1/template/.gitignore $1
19 rm -rf $CURDIR/$1/template
21 mv $1/example.tex $1/$1.tex
23 # create a symlink farm for the fonts
28 # first created the directories
29 for fontdir in "${SOURCEDIR}/template/fonts/"*; do
30 mkdir "./fonts/$(basename "${fontdir}")"
32 for fontfile in "${fontdir}/"*; do
33 ln -s "${fontfile}" "./fonts/$(basename "${fontdir}")/$(basename "${fontfile}")"
39 echo "specifiy a directory where the template should go";