summaryrefslogblamecommitdiffstats
path: root/skripti/mgl_obvesti_ob_dogodku.sh
blob: 111706301f496df2d9e841f8f1c95a5bbfe96a97 (plain) (tree)
1
2
3
4
5
6




                  
                












                                                                                                                                                                            
    
#!/bin/bash
set -xeuo pipefail
olds=""
while :
do
	sleep 60
	news=`curl -H "User-Agent: $0 kontakt anton@sijanec.eu" "https://www.mgl.si/sl/spored/?location=1&event=1072&subs=" | grep "big-date" | cut -d\> -f2 | cut -d\< -f1`
	if [ "$news" = "$olds" ]
	then
		continue
	fi
sendmail anton@sijanec.eu <<EOF
From: projects-r-skripti-mgl.sh@sijanec.eu
To: anton@sijanec.eu
Subject: novi datumi iskane predstave v mgl

datumi so: $news
EOF
	olds=$news
done