Home | History | Annotate | Download | only in bin
      1 #!/bin/bash
      2 
      3 # This script is used to generate the list of changes that
      4 # appears in the release notes files, with HTML formatting.
      5 #
      6 # Usage examples:
      7 #
      8 # $ bin/shortlog_mesa.sh mesa-9.0.2..mesa-9.0.3
      9 # $ bin/shortlog_mesa.sh mesa-9.0.2..mesa-9.0.3 > changes
     10 # $ bin/shortlog_mesa.sh mesa-9.0.2..mesa-9.0.3 | tee changes
     11 
     12 
     13 typeset -i in_log=0
     14 
     15 git shortlog $* | while read l
     16 do
     17     if [ $in_log -eq 0 ]; then
     18 	echo '<p>'$l'</p>'
     19 	echo '<ul>'
     20 	in_log=1
     21     elif echo "$l" | egrep -q '^$' ; then
     22 	echo '</ul>'
     23 	echo
     24 	in_log=0
     25     else
     26         mesg=$(echo $l | sed 's/ (cherry picked from commit [0-9a-f]\+)//;s/\&/&amp;/g;s/</\&lt;/g;s/>/\&gt;/g')
     27 	echo '  <li>'${mesg}'</li>'
     28     fi
     29 done
     30