#!/bin/bash


for dir in $@ ; do

    rm -f $dir/*.md5sum

    for file in $dir/* ; do

        md5sum $file > $file.md5sum

    done

    ls -l $dir/* | awk -v dir=$dir '
BEGIN {
    base_offset=length(dir)+2;
}

{
    size=$5;
    name=$9;
    base=substr(name,base_offset);
    printf "    (\"%s\"\n     \"%s\"\n     %d)\n",base,name,size;
}
'

done
ViewGit