2
0

contrithanks.sh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/bin/sh
  2. #***************************************************************************
  3. # _ _ ____ _
  4. # Project ___| | | | _ \| |
  5. # / __| | | | |_) | |
  6. # | (__| |_| | _ <| |___
  7. # \___|\___/|_| \_\_____|
  8. #
  9. # Copyright (C) 2013-2017, 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.haxx.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 -z "$start"; then
  29. echo "Usage: $0 <since this tag/hash>"
  30. fi
  31. cat ./docs/THANKS
  32. (
  33. git log $start..HEAD | \
  34. egrep -ai '(^Author|^Commit|by):' | \
  35. cut -d: -f2- | \
  36. cut '-d(' -f1 | \
  37. cut '-d<' -f1 | \
  38. tr , '\012' | \
  39. sed 's/ and /\n/' | \
  40. sed -e 's/^ //' -e 's/ $//g' -e 's/@users.noreply.github.com$/ on github/'
  41. # grep out the list of names from RELEASE-NOTES
  42. # split on ", "
  43. # remove leading white spaces
  44. grep -a "^ [^ (]" RELEASE-NOTES| \
  45. sed 's/, */\n/g'| \
  46. sed 's/^ *//'
  47. )| \
  48. sed -f ./docs/THANKS-filter | \
  49. grep -a ' ' | \
  50. sort -fu | \
  51. grep -aixvf ./docs/THANKS