diff options
author | Andreas Müller <andreas.mueller@ost.ch> | 2021-06-04 16:46:46 +0200 |
---|---|---|
committer | Andreas Müller <andreas.mueller@ost.ch> | 2021-06-04 16:46:46 +0200 |
commit | 4752a00668c8de082d467bbdb8ba47f3cb0091b4 (patch) | |
tree | a3c3782662c1f8ee5e54c40eb9b9d62d30f90c74 /buch/papers/scripts/mktemplate | |
parent | add ideas file (diff) | |
download | SeminarSpezielleFunktionen-4752a00668c8de082d467bbdb8ba47f3cb0091b4.tar.gz SeminarSpezielleFunktionen-4752a00668c8de082d467bbdb8ba47f3cb0091b4.zip |
add basic file infrastructure for special function book
Diffstat (limited to '')
-rw-r--r-- | buch/papers/scripts/mktemplate | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/buch/papers/scripts/mktemplate b/buch/papers/scripts/mktemplate new file mode 100644 index 0000000..a5c1e52 --- /dev/null +++ b/buch/papers/scripts/mktemplate @@ -0,0 +1,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="teil0.tex teil1.tex teil2.tex teil3.tex" + +for file in ${FILES} ${SECTIONS} +do + echo "generating ${target}/${file}" + sed -e 's/000template/'"${target}"'/g' < 000template/${file} \ + > ${target}/${file} +done + |