Andreas Boll | c1dcf96 | 2012-06-14 08:25:42 -0600 | [diff] [blame] | 1 | #!/bin/bash |
Brian Paul | 51c9c67 | 2012-06-14 08:22:54 -0600 | [diff] [blame] | 2 | |
| 3 | # This script is used to generate the list of changes that |
| 4 | # appears in the release notes files, with HTML formatting. |
Andreas Boll | b8e41db | 2013-04-18 09:32:39 +0200 | [diff] [blame] | 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 |
Brian Paul | 51c9c67 | 2012-06-14 08:22:54 -0600 | [diff] [blame] | 11 | |
| 12 | |
| 13 | typeset -i in_log=0 |
| 14 | |
| 15 | git shortlog $* | while read l |
| 16 | do |
| 17 | if [ $in_log -eq 0 ]; then |
Andreas Boll | c1dcf96 | 2012-06-14 08:25:42 -0600 | [diff] [blame] | 18 | echo '<p>'$l'</p>' |
Brian Paul | 51c9c67 | 2012-06-14 08:22:54 -0600 | [diff] [blame] | 19 | echo '<ul>' |
| 20 | in_log=1 |
| 21 | elif echo "$l" | egrep -q '^$' ; then |
Andreas Boll | c1dcf96 | 2012-06-14 08:25:42 -0600 | [diff] [blame] | 22 | echo '</ul>' |
Brian Paul | 51c9c67 | 2012-06-14 08:22:54 -0600 | [diff] [blame] | 23 | echo |
| 24 | in_log=0 |
| 25 | else |
Andreas Boll | c1dcf96 | 2012-06-14 08:25:42 -0600 | [diff] [blame] | 26 | mesg=$(echo $l | sed 's/ (cherry picked from commit [0-9a-f]\+)//;s/\&/&/g;s/</\</g;s/>/\>/g') |
Brian Paul | 51c9c67 | 2012-06-14 08:22:54 -0600 | [diff] [blame] | 27 | echo ' <li>'${mesg}'</li>' |
| 28 | fi |
| 29 | done |