#!/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 # # this is version 2 of the script from 2008-07-01 tmprepo=dwm-sloccount-$$ slocdata=dwm-sloccount-$$-data output=dwm-sloccount.png hg clone http://www.suckless.org/hg.rc/dwm "$tmprepo" >/dev/null cd "$tmprepo" rm -f "../$slocdata" tip=`hg tip | grep changeset | cut -d ":" -f 2` for i in `seq $tip -1 1` ; do hg update -r $i -C >/dev/null sloc=`sloccount . | awk '/^ansic/{print $2}'` echo $i $sloc >> "../$slocdata" done gnuplot </dev/null rm -r "$tmprepo"