cleanup of the presentation generation process

Clean up some bash scripts, that are used for the generation of the
presentation.

Some improvements:
* Only ssh to fsmi-login if not already running on a fsmi host.
* Use the defined postgresql service instead of manually specifing the host
* Fix bugs that could occure when having spaces in filenames
* Find the fslogo.png in the root when generating the presentation

Signed-off-by: Tobias Wiese <tobias@tobiaswiese.com>
This commit is contained in:
Tobias Wiese
2021-04-28 01:31:01 +02:00
committed by Yannik Enss
parent 1c9eb8535d
commit 6f5325678f
4 changed files with 40 additions and 16 deletions

View File

@@ -1,16 +1,18 @@
#!/bin/bash
dest_file="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/data/presentation_$(date +%Y-%m-%d).tex"
#!/bin/sh
set -e
dest_file="$(realpath "$(dirname "$0")")/data/presentation_$(date +%Y-%m-%d).tex"
echo Reading old protocols
./read_db.sh
echo Getting E-Mail
./read_ubmails.py
echo Generating
./generate.py --presentation > $dest_file
./generate.py --presentation >"$dest_file"
echo Compiling
mkdir -p data/presentation
cd data/presentation/
pdflatex $dest_file > /dev/null
pdflatex $dest_file > /dev/null
pdflatex $dest_file > /dev/null
for _ in $(seq 3); do
pdflatex "$dest_file"
done