contrithanks.sh 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #!/bin/sh
  2. #***************************************************************************
  3. # _ _ ____ _
  4. # Project ___| | | | _ \| |
  5. # / __| | | | |_) | |
  6. # | (__| |_| | _ <| |___
  7. # \___|\___/|_| \_\_____|
  8. #
  9. # Copyright (C) 2013 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  10. #
  11. # This software is licensed as described in the file COPYING, which
  12. # you should have received as part of this distribution. The terms
  13. # are also available at https://curl.se/docs/copyright.html.
  14. #
  15. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  16. # copies of the Software, and permit persons to whom the Software is
  17. # furnished to do so, under the terms of the COPYING file.
  18. #
  19. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  20. # KIND, either express or implied.
  21. #
  22. ###########################################################################
  23. #
  24. # This script shows all mentioned contributors from <hash> until HEAD and
  25. # puts them at the end of the THANKS document on stdout
  26. #
  27. start=$1
  28. if test "$start" = "-h"; then
  29. echo "Usage: $0 <since this tag/hash>"
  30. exit
  31. fi
  32. if test -z "$start"; then
  33. start=`git tag --sort=taggerdate | grep "^curl-" | tail -1`;
  34. fi
  35. # We also include curl-www if possible. Override by setting CURLWWW
  36. if [ -z "$CURLWWW" ] ; then
  37. CURLWWW=../curl-www
  38. fi
  39. cat ./docs/THANKS
  40. (
  41. (
  42. git log --use-mailmap $start..HEAD
  43. if [ -d "$CURLWWW" ]
  44. then
  45. git -C ../curl-www log --use-mailmap $start..HEAD
  46. fi
  47. ) | \
  48. egrep -ai '(^Author|^Commit|by):' | \
  49. cut -d: -f2- | \
  50. cut '-d(' -f1 | \
  51. cut '-d<' -f1 | \
  52. tr , '\012' | \
  53. sed 's/ at github/ on github/' | \
  54. sed 's/ and /\n/' | \
  55. sed -e 's/^ //' -e 's/ $//g' -e 's/@users.noreply.github.com$/ on github/'
  56. # grep out the list of names from RELEASE-NOTES
  57. # split on ", "
  58. # remove leading whitespace
  59. grep -a "^ [^ (]" RELEASE-NOTES| \
  60. sed 's/, */\n/g'| \
  61. sed 's/^ *//'
  62. )| \
  63. sed -f ./docs/THANKS-filter | \
  64. grep -a ' ' | \
  65. sort -fu | \
  66. grep -aixvf ./docs/THANKS