updated gitignore to ignore xdv
[beamer-mako] / new_beamer_presentation
1 #!/bin/sh
2
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.
6
7 SOURCEDIR="$HOME/tex/beamer-mako"
8 CURDIR=`pwd`
9
10 if test $1
11 then
12     cd $SOURCEDIR
13     git checkout-index -f --prefix=$CURDIR/$1/ $(find template -not -type d)
14     cd $CURDIR
15
16     # get rid of paper_template subdir
17     mv $1/template/* $1
18     mv $1/template/.gitignore $1
19     rm -rf $CURDIR/$1/template
20
21     mv $1/example.tex $1/$1.tex
22
23     # create a symlink farm for the fonts
24     # rm -rf "./fonts/*"
25     cd $1
26     rm -rf ./fonts/*
27
28     # first created the directories
29     for fontdir in "${SOURCEDIR}/template/fonts/"*; do
30         mkdir "./fonts/$(basename "${fontdir}")"
31         # then the files
32         for fontfile in "${fontdir}/"*; do
33             ln -s "${fontfile}" "./fonts/$(basename "${fontdir}")/$(basename "${fontfile}")"
34         done;
35     done;
36
37     cd $CURDIR
38 else
39     echo "specifiy a directory where the template should go";
40 fi

Benjamin Mako Hill || Want to submit a patch?