aboutsummaryrefslogtreecommitdiffstats
path: root/emacs-scala-mode/watch
blob: 2422906c860073eeacf0ddc6dc3ef3dbacd4de98 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

wget http://www.scala-lang.org/downloads -O - 2>/dev/null | grep -Po 'scala-tool-support-.+>' | head -n 2 > release

if [ $? = 0 ]; then
	[ -f unfetchable ] && rm unfetchable
	md5sum release > new-sum
	touch sum
	if [ "$(cat sum)" = "$(cat new-sum)" ]; then
		rm new-sum
	else
		mv new-sum sum
		echo 'emacs-scala-mode'
	fi
elif [ ! -f unfetchable ]; then
	touch unfetchable
	echo 'emacs-scala-mode (unfetchable)'
fi