2 #***************************************************************************
4 # Project ___| | | | _ \| |
6 # | (__| |_| | _ <| |___
7 # \___|\___/|_| \_\_____|
9 # Copyright (C) 2013-2014, Daniel Stenberg, <daniel@haxx.se>, et al.
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 http://curl.haxx.se/docs/copyright.html.
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.
19 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 # KIND, either express or implied.
22 ###########################################################################
25 # This script shows all mentioned contributors from <hash> until HEAD. To aid
26 # when writing RELEASE-NOTES and THANKS.
28 # Use --releasenotes to also include the names from the existing RELEASE-NOTES
29 # file, which is handy when we've added names manually in there that should be
30 # included in an updated list.
35 if test -z "$start"; then
36 echo "Usage: $0 <since this tag/hash>"
39 # filter out Author:, Commit: and *by: lines
40 # cut off the email parts
41 # split list of names at comma
42 # split list of names at " and "
43 # cut off spaces first and last on the line
44 # filter alternatives through THANKS-filter
45 # only count names with a space (ie more than one word)
46 # sort all unique names
47 # awk them into RELEASE-NOTES format
49 git log $start..HEAD | \
50 egrep -i '(Author|Commit|by):' | \
55 sed -e 's/^ //' -e 's/ $//g'
57 if echo "$*" | grep -qw -- '--releasenotes';then
58 # if --releasenotes was used
59 # grep out the list of names from RELEASE-NOTES
61 # remove leading white spaces
62 grep "^ [^ ]" RELEASE-NOTES| \
67 sed -f ./docs/THANKS-filter | \
72 n = sprintf("%s%s%s,", n, length(n)?" ":"", $0);
84 printf(" (%d contributors)\n", num);