blob: 31a54055fa48c78762cfd06d19769388b540b384 (
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
|
#!/bin/sh
# requires: wget git
set -euf
NOW=$(date -I)
OUTDIR=${OUTDIR:-$PWD}
DATADIR=${DATADIR:-$OUTDIR/db}
PDFDIR=${PDFDIR:-$OUTDIR/pdf}
# old: thyssenkruppsystemengineering
# empty: metabo-nuertingen
mkdir -p $DATADIR $PDFDIR
for i in thales-deutschland ibm-boeblingen buerocampus-wangen continental-villingen vodafone-campus ;do
db=$DATADIR/$i.json
arafetch --db $db --cantine $i
ara2influx $db --cantine $i
db=$PDFDIR/$i-$NOW.pdf
wget http://gast.aramark.de/$i/menu/pdf/woche_de.php -O $db
# commit changes
pushd $DATADIR
if ! test -e .git;then
echo "initializing git repo for $DATADIR"
git init
fi
git add -A
git commit -m "update $NOW"
popd
done
|