iris/android: move iris_query.c to 'per gen' LIBIRIS_SRC_FILES
[mesa.git] / bin / bugzilla_mesa.sh
1 #!/bin/sh
2
3 # This script is used to generate the list of fixed bugs that
4 # appears in the release notes files, with HTML formatting.
5 #
6 # Note: This script could take a while until all details have
7 # been fetched from bugzilla.
8 #
9 # Usage examples:
10 #
11 # $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3
12 # $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 > bugfixes
13 # $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 | tee bugfixes
14
15
16 # regex pattern: trim before bug number
17 trim_before='s/.*show_bug.cgi?id=\([0-9]*\).*/\1/'
18
19 # regex pattern: reconstruct the url
20 use_after='s,^,https://bugs.freedesktop.org/show_bug.cgi?id=,'
21
22 echo "<ul>"
23 echo ""
24
25 # extract fdo urls from commit log
26 git log --pretty=medium $* | grep 'bugs.freedesktop.org/show_bug' | sed -e $trim_before | sort -n -u | sed -e $use_after |\
27 while read url
28 do
29 id=$(echo $url | cut -d'=' -f2)
30 summary=$(wget --quiet -O - $url | grep -e '<title>.*</title>' | sed -e 's/ *<title>[0-9]\+ &ndash; \(.*\)<\/title>/\1/')
31 echo "<li><a href=\"$url\">Bug $id</a> - $summary</li>"
32 echo ""
33 done
34
35 echo "</ul>"