#!/bin/bash
startdate="2012-04-05"
for line in $(cat repos.txt); do
    pushd /home/andrew/code/airtime/$line
    echo $pwd
    rev=`git rev-list master -n 1 --first-parent --before=$startdate`
    if [ -z "$rev" ]
        then
            rev=`git rev-list master | tail -n 1`
    fi
    echo $rev
    popd
    ./gitstats -c commit_begin=$rev /home/andrew/code/airtime/$line $line-$startdate
done
