From 0df3581aa0b48f62059b8822febd11b8c112c6d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 25 Feb 2021 12:53:08 +0100 Subject: add missing files --- vorlesungen/setup | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 vorlesungen/setup diff --git a/vorlesungen/setup b/vorlesungen/setup new file mode 100644 index 0000000..a6f5539 --- /dev/null +++ b/vorlesungen/setup @@ -0,0 +1,35 @@ +#! /bin/bash +# +# setup -- prepare a new topic +# +if [ $# -lt 2 ] +then + echo "not enough arguments" + echo "usage: setup number topic" + echo "Files will be in _, -handout, MathSem--.tex" + exit 1 +fi + +topic=${2} +number=`printf %02d ${1}` +directory=${number}_${topic} + +if [ -d ${directory} ] +then + echo ${directory} already exists + exit 1 +fi + +mkdir ${directory} + +cp 00_template/common.tex ${directory} +cp 00_template/slides.tex ${directory} + +sed -e "s/xxx/${topic}/g" -e "s/yyy/${number}/g" 00_template/Makefile \ + > ${directory}/Makefile +sed -e "s/xxx/${topic}/g" -e "s/yyy/${number}/g" 00_template/handout.tex \ + > ${directory}/${topic}-handout.tex +sed -e "s/xxx/${topic}/g" -e "s/yyy/${number}/g" 00_template/presentation.tex \ + > ${directory}/MathSem-${number}-${topic}.tex + + -- cgit v1.2.1