Ticket #6095: watch.sh

File watch.sh, 1.1 KB (added by mikeperry, 7 years ago)

Super-ghetto Firefox url watching script.

Line 
1#!/bin/bash
2
3NEXTESR="10\.0\.5esr/"
4NEXTRAPID="14\.0/|13\.0\.1/"
5
6URL="https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/"
7urldump=`wget -q $URL -O -`
8
9echo $urldump | egrep $NEXTESR > /dev/null
10if [ $? -eq 0 -a ! -f ~/emailt-esr ]
11then
12  echo "New Firefox ESR release is out at $URL" | mail mikeperry@torproject.org -s "New Firefox 10.x ESR is out!"
13  echo "New Firefox ESR release is out at $URL" | mail erinn@torproject.org -s "New Firefox 10.x ESR is out!"
14  echo "New Firefox ESR release is out at $URL" | mail sebastian@torproject.org -s "New Firefox 10.x ESR is out!"
15  touch ~/emailt-esr
16fi
17
18
19echo $urldump | egrep $NEXTRAPID > /dev/null
20if [ $? -eq 0 -a ! -f ~/emailt-rr ]
21then
22  echo "New Firefox Rapid Release is out at $URL" | mail mikeperry@torproject.org -s "New Firefox Rapid Release is out!"
23  echo "New Firefox Rapid Release is out at $URL" | mail erinn@torproject.org -s "New Firefox Rapid Release is out"
24  echo "New Firefox Rapid Release is out at $URL" | mail sebastian@torproject.org -s "New Firefox Rapid Release is out!"
25  touch ~/emailt-rr
26fi
27
28