Add 'Guessed-By' to (author,date) inferred notes
[trackgit.git] / run-all.sh
blobe51831d02dea2361a68deecef39be6b6985b88c3
1 #!/bin/sh
3 # config
4 GMANE_DROPBOX=~/dl/gmane-git
5 REPO=~/tmp/git
6 TOOLPATH=~/dev/trackgit
8 # download new mails
9 cd "$GMANE_DROPBOX"
10 cur_inbox=$(ls | sort -n | tail -1)
11 cur_gmane_id () {
12 grep '^Archived-At' "$1" | tail -1 | sed 's#.*/\([0-9]\{1,\}\)>$#\1#'
14 begin=$(cur_gmane_id $cur_inbox)
15 boundary=$(($begin+1000))
16 wget -O gmane-$boundary.tmp http://download.gmane.org/gmane.comp.version-control.git/$begin/$boundary
17 end=$(cur_gmane_id gmane-$boundary.tmp)
18 if [ -z "$end" ]; then
19 rm gmane-$boundary.tmp
20 else
21 mv gmane-$boundary.tmp $end
24 # rest _must_ run in git clone
25 cd "$REPO"
27 # update our git.git
28 git fetch origin
29 "$TOOLPATH"/blobtracker.py origin/master origin/next origin/pu
31 # import mails
32 if [ -n "$end" ]; then
33 "$TOOLPATH"/mail.py "$GMANE_DROPBOX"/$end
36 # redo notes
37 "$TOOLPATH"/notes.py
39 # push
40 git push trast notes/terse notes/full