shortlog_mesa.sh 675 Bytes
Newer Older
1
#!/bin/sh
2 3 4

# This script is used to generate the list of changes that
# appears in the release notes files, with HTML formatting.
5 6 7 8 9 10
#
# Usage examples:
#
# $ bin/shortlog_mesa.sh mesa-9.0.2..mesa-9.0.3
# $ bin/shortlog_mesa.sh mesa-9.0.2..mesa-9.0.3 > changes
# $ bin/shortlog_mesa.sh mesa-9.0.2..mesa-9.0.3 | tee changes
11 12


13
in_log=0
14 15 16 17

git shortlog $* | while read l
do
    if [ $in_log -eq 0 ]; then
18
	echo '<p>'$l'</p>'
19 20 21
	echo '<ul>'
	in_log=1
    elif echo "$l" | egrep -q '^$' ; then
22
	echo '</ul>'
23 24 25
	echo
	in_log=0
    else
26
        mesg=$(echo $l | sed 's/ (cherry picked from commit [0-9a-f]\+)//;s/\&/&amp;/g;s/</\&lt;/g;s/>/\&gt;/g')
27 28 29
	echo '  <li>'${mesg}'</li>'
    fi
done