#!/bin/sh # # creates a graph with the SLOC of dwm through the time # output is generated in the current directory # requires: mercurial, sloccount, gnuplot # # markus schnalke tmprepo=dwm-sloccount-$$ slocdata=dwm-sloccount-data-$$ output=dwm-sloccount.png hg clone http://www.suckless.org/hg.rc/dwm "$tmprepo" cd "$tmprepo" tip=`hg tip | grep changeset | cut -d ":" -f 2` rm "$slocdata" for i in `seq $tip -1 1` ; do hg strip $i 2>/dev/null sloc=`sloccount . | awk '/^ansic/{print $2}'` echo $i $sloc >> "$slocdata" done gnuplot <