#!/bin/bash
for file in `git ls-files www/scripts`
do
    HASH=`git rev-list HEAD $file | tail -n 1`
    DATE=`git show -s --format="%ci" $HASH --`
    #SIZE=`git cat-file -s $HASH`
    bytes="`git ls-tree -l -r ${HASH} | grep -E "[[:space:]]${file}" | awk '{print $4}'`"
    human=`echo ${bytes} | awk '{ split( "B KB MB GB TB" , v ); s=1; while( $1>1024 ){ $1/=1024; s++ } print int($1) v[s] }'`
    #printf "%-35s %s\n  %s\n" $file $HASH: "$DATE"
    echo "$DATE -> $file -> $human"
done
