Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bugzilla_mesa.sh 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/bash
  2. # This script is used to generate the list of fixed bugs that
  3. # appears in the release notes files, with HTML formatting.
  4. #
  5. # Note: This script could take a while until all details have
  6. # been fetched from bugzilla.
  7. #
  8. # Usage examples:
  9. #
  10. # $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3
  11. # $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 > bugfixes
  12. # $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 | tee bugfixes
  13. # $ DRYRUN=yes bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3
  14. # $ DRYRUN=yes bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 | wc -l
  15. # regex pattern: trim before bug number
  16. trim_before='s/.*show_bug.cgi?id=\([0-9]*\).*/\1/'
  17. # regex pattern: reconstruct the url
  18. use_after='s,^,https://bugs.freedesktop.org/show_bug.cgi?id=,'
  19. # extract fdo urls from commit log
  20. urls=$(git log $* | grep 'bugs.freedesktop.org/show_bug' | sed -e $trim_before | sort -n -u | sed -e $use_after)
  21. # if DRYRUN is set to "yes", simply print the URLs and don't fetch the
  22. # details from fdo bugzilla.
  23. #DRYRUN=yes
  24. if [ "x$DRYRUN" = xyes ]; then
  25. for i in $urls
  26. do
  27. echo $i
  28. done
  29. else
  30. echo "<ul>"
  31. echo ""
  32. for i in $urls
  33. do
  34. id=$(echo $i | cut -d'=' -f2)
  35. summary=$(wget --quiet -O - $i | grep -e '<title>.*</title>' | sed -e 's/ *<title>Bug [0-9]\+ &ndash; \(.*\)<\/title>/\1/')
  36. echo "<li><a href=\"$i\">Bug $id</a> - $summary</li>"
  37. echo ""
  38. done
  39. echo "</ul>"
  40. fi