From 2a2f0d44710da2bbb88e7c2ff666bf729df45805 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 17 Nov 2012 07:58:42 +0100 Subject: automatic update watch for rssyl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- rssyl/watch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 rssyl/watch diff --git a/rssyl/watch b/rssyl/watch new file mode 100755 index 0000000..4002878 --- /dev/null +++ b/rssyl/watch @@ -0,0 +1,17 @@ +#!/bin/sh + +wget 'http://www.claws-mail.org/plugins.php?branch=EXT' >/dev/null 2>/dev/null +if [ $? = 0 ]; then + head --lines=$(( $(grep -n RSSyl < 'plugins.php?branch=EXT' | cut -f 1 -d \:) + 30 )) < 'plugins.php?branch=EXT' | tail --lines=30 | grep nowrap | md5sum > new-sum + touch sum + if [ "$(cat sum)" = "$(cat new-sum)" ]; then + rm new-sum + else + mv new-sum sum + echo 'rssyl' + fi + rm 'plugins.php?branch=EXT' +else + echo 'rssyl (unfetchable)' +fi + -- cgit v1.2.3-70-g09d2