aboutsummaryrefslogtreecommitdiffstats
path: root/texlive-flashcards/watch
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtexlive-flashcards/watch21
1 files changed, 21 insertions, 0 deletions
diff --git a/texlive-flashcards/watch b/texlive-flashcards/watch
new file mode 100755
index 0000000..cd655ff
--- /dev/null
+++ b/texlive-flashcards/watch
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+[ -f flashcards ] && rm flashcards
+
+wget 'http://ctan.org/pkg/flashcards' -O flashcards >/dev/null 2>/dev/null
+
+if [ $? = 0 ]; then
+ [ -f unfetchable ] && rm unfetchable
+ grep 'Ver&shy;sion' < flashcards | md5sum > new-sum
+ touch sum
+ if [ "$(cat sum)" = "$(cat new-sum)" ]; then
+ rm new-sum
+ else
+ mv new-sum sum
+ echo 'texlive-flashcards'
+ fi
+elif [ ! -f unfetchable ]; then
+ touch unfetchable
+ echo 'texlive-flashcards (unfetchable)'
+fi
+