From ac4b80be810fc615b426557ad86f0cb8092f5304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 3 Dec 2020 17:18:03 +0100 Subject: add files --- buch/papers/scripts/mktemplate | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 buch/papers/scripts/mktemplate (limited to 'buch/papers/scripts/mktemplate') diff --git a/buch/papers/scripts/mktemplate b/buch/papers/scripts/mktemplate new file mode 100644 index 0000000..2307e3e --- /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="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 + -- cgit v1.2.1