blob: 2307e3e3e7f08d32126f9aeef2b8b8f0aa59b2a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#
# mktemplate -- generate empty project files
#
# (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
#
# make sure we have a target argument
if [ $# -lt 1 ]
then
echo "paper short name missing" >&2
exit 1
fi
target=${1:-test}
if [ -z "${target}" ]
then
echo "target name empty" >&2
exit 1
fi
# generate the directory
if [ ! -d ${target} ]
then
mkdir ${target}
fi
FILES="Makefile.inc Makefile main.tex packages.tex references.bib"
SECTIONS="einleitung.tex problemstellung.tex loesung.tex folgerungen.tex"
for file in ${FILES} ${SECTIONS}
do
echo "generating ${target}/${file}"
sed -e 's/000template/'"${target}"'/g' < 000template/${file} \
> ${target}/${file}
done
|