aboutsummaryrefslogtreecommitdiffstats
path: root/xcftools/watch
blob: 09ac1ebb4e56f701d544c119a9ac2e5ee1b87b37 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

[ -f 'versions' ] &&  rm 'versions'
wget http://henning.makholm.net/xcftools -O - | grep -Po '<a [^>]*>' | grep 'xcftools' | grep -v asc > versions
if [ $? = 0 ]; then
	[ -f unfetchable ] && rm unfetchable
	md5sum < versions > new-sum
	touch sum
	if [ "$(cat sum)" = "$(cat new-sum)" ]; then
		rm new-sum
	else
		mv new-sum sum
		echo 'xcftools'
	fi
	rm versions
elif [ ! -f unfetchable ]; then
	touch unfetchable
	echo 'xcftools (unfetchable)'
fi