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.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 url
  16. trim_before='s/.*\(http\)/\1/'
  17. # regex pattern: trim after url
  18. trim_after='s/\(show_bug.cgi?id=[0-9]*\).*/\1/'
  19. # regex pattern: always use https
  20. use_https='s/http:/https:/'
  21. # extract fdo urls from commit log
  22. urls=$(git log $* | grep 'bugs.freedesktop.org/show_bug' | sed -e $trim_before -e $trim_after -e $use_https | sort | uniq)
  23. # if DRYRUN is set to "yes", simply print the URLs and don't fetch the
  24. # details from fdo bugzilla.
  25. #DRYRUN=yes
  26. if [ "x$DRYRUN" = xyes ]; then
  27. for i in $urls
  28. do
  29. echo $i
  30. done
  31. else
  32. echo "<ul>"
  33. echo ""
  34. for i in $urls
  35. do
  36. id=$(echo $i | cut -d'=' -f2)
  37. summary=$(wget --quiet -O - $i | grep -e '<title>.*</title>' | sed -e 's/ *<title>Bug [0-9]\+ &ndash; \(.*\)<\/title>/\1/')
  38. echo "<li><a href=\"$i\">Bug $id</a> - $summary</li>"
  39. echo ""
  40. done
  41. echo "</ul>"
  42. fi