#!/bin/sh # # Generate GNU/HTML/XML formatted changelogs from SVN # # Variables PATH=$PATH:/usr/local/bin:/usr/java/jdk/jre/bin:/usr/java/jre/bin PROJECTS="prj" OUTPUTS=/var/www/html CONTACT=root@localhost.localdomain # Code # # Get SVNROOT if needed # if [ -z "$SVNROOT" -a -f /etc/profile ] then . /etc/profile fi if [ -z "$SVNROOT" ] then echo "No SVNROOT defined, exiting." 1>&2 exit 1 fi for PROJ in $PROJECTS do # # Preparations # mkdir -p $OUTPUTS/$PROJ-svn-stats cd $OUTPUTS/$PROJ-svn-stats || exit 1 svn co file://$SVNROOT/$PROJ > /dev/null 2>&1 # # ChangeLog # svn2cl -f ChangeLog-$PROJ --authors=$SVNROOT/conf/users --title "$PROJ ChangeLog" $PROJ > /dev/null 2>&1 svn log --xml --verbose $PROJ > ChangeLog-$PROJ.xml 2>&1 svn2cl -f ChangeLog-$PROJ.html --authors=$SVNROOT/conf/users --html --revision-link="/cgi-bin/viewvc.cgi?view=rev&revision=" --title "$PROJ ChangeLog" $PROJ > /dev/null 2>&1 # # StatSVN # svn log $PROJ > $PROJ-log.txt 2>/dev/null java -jar /usr/local/share/statsvn.jar -bugzilla /bugzilla/ -viewvc /cgi-bin/viewvc.cgi/$PROJ -exclude "ChangeLog*" -title $PROJ ChangeLog-$PROJ.xml prj > /dev/null # # Clean up # rm -rf $PROJ > /dev/null mv index.html statsvn.html perl -pi -e 's,href="index.html",href="statsvn.html",g' *.html # # Create the web page # cat << END > index.html
Document prepared by $CONTACT.
END done exit 0