summaryrefslogblamecommitdiffstats
path: root/skripti/download-changes-to-website.sh
blob: 590a104e91433e08950f16d52cf2534f6eccea8b (plain) (tree)
1
2
3
4
5
6
7
8
9







                                 
                                                                       
                                       
                                                       

                
#!/bin/bash
set -ex
n=`rev <<<$0 | cut -d/ -f1 | rev`
s=10
[ x$2 != x ] && s=$2
while :
do
	t=`mktemp -p "" $n.XXX`
	curl --cookie "$3" $1 | grep -v __RequestVerificationToken > $t
	f=`sha256sum $t | cut -d\  -f1`
	[ -f $f ] && rm $t || ( mv $t $f && eval "$4" )
	sleep $s
done