Merge branch 'master' of g.phga.de:phga/share into master
This commit is contained in:
commit
3805e055fc
5
noten.sh
5
noten.sh
@ -32,6 +32,11 @@ AJAXDATA=$(curl -s -b $COOKIES -c $COOKIES -d "User=$USERNAME&Session=$SESSION&L
|
||||
# Finally...
|
||||
cp $FINALFILE $TMPPATH
|
||||
curl -s -b $COOKIES -c $COOKIES -d $AJAXDATA $FU | awk 'f{ if (/<\/tbody>/){printf "%s", buf; f=0; buf=""} else buf = buf $0 ORS}; /<tbody>/{f=1}' | rg -o -e '<b>(.*)</b>' -r '$1' | sudo -u http tee $FINALFILE
|
||||
# If nothing is returned exit to prevent unwanted mails
|
||||
if [ $(wc -l < $FINALFILE) -lt 2 ]; then
|
||||
cp $TMPPATH/noten.html $FINALFILE
|
||||
exit 1
|
||||
fi
|
||||
# If there is a change in the file, send an email
|
||||
D=$(diff $FINALFILE $TMPPATH/noten.html)
|
||||
if [ "$D" != "" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user