aboutsummaryrefslogtreecommitdiffstats
path: root/nafe/watch
blob: 776dfd141a64851911e808e2f4996f7e1c8fa58f (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 'version' ] &&  rm 'version'
wget http://sourceforge.net/projects/nafe/files/nafe -O - | grep -o 'Download nafe-[^)]*B)' > version
if [ $? = 0 ]; then
	[ -f unfetchable ] && rm unfetchable
	md5sum < version > new-sum
	touch sum
	if [ "$(cat sum)" = "$(cat new-sum)" ]; then
		rm new-sum
	else
		mv new-sum sum
		echo 'nafe'
	fi
	rm version
elif [ ! -f unfetchable ]; then
	touch unfetchable
	echo 'nafe (unfetchable)'
fi