Revert "... and stop calling the blobtracker"
[trackgit.git] / run-all.sh
blob46015b2ef1cf03722a341ca50738628f6c0e10e3
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 unwind_noop () {
40 git diff-tree --quiet --exit-code $1^! &&
41 git update-ref refs/heads/$1 $1^
43 unwind_noop notes/full
44 unwind_noop notes/terse
46 # push
47 git push trast notes/terse notes/full