summaryrefslogblamecommitdiffstats
path: root/skripti/mgl_obvesti_ob_dogodku.sh
blob: 3714513f7953f63c714a5e99f4babb34eeac93a6 (plain) (tree)



















                                                                                                                                                                            
#!/bin/bash
set -xeuo pipefail
olds=""
while :
do
	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
	sleep 60
done