codekasten/spielspass/count_svnchanges.sh
2006-07-20 20:36:49 +00:00

16 lines
484 B
Bash

#!/bin/sh
set -e
SVNPATH="/data/repos/"
STATS[0]="svn Aenderungen:\n"
i=1
for svn in `ls ${SVNPATH}`; do
countnew=`cut -d " " -f1 ${svn}/db/current`
countold=`cut -d " " -f1 ${svn}/db/current.old`
changes=$[${countnew}-${countold}]
STATS[$i]="\t${changes}\t${svn}\n"
((i++))
cp ${svn}/db/current ${svn}/db/current.old
done
#echo -e ${STATS[@]}
echo -e ${STATS[@]} | mail -s "[counter] aktuelle Aenderungen" svn@admin.systemausfall.org