test506: verify aa6884845168
[platform/upstream/curl.git] / contributors.sh
1 #!/bin/sh
2 #***************************************************************************
3 #                                  _   _ ____  _
4 #  Project                     ___| | | |  _ \| |
5 #                             / __| | | | |_) | |
6 #                            | (__| |_| |  _ <| |___
7 #                             \___|\___/|_| \_\_____|
8 #
9 # Copyright (C) 2013-2014, 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 http://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 #
25 # This script shows all mentioned contributors from <hash> until HEAD. To aid
26 # when writing RELEASE-NOTES and THANKS.
27 #
28
29 start=$1
30
31 if test -z "$start"; then
32   echo "Usage: $0 <since this tag/hash>"
33 fi
34
35 # filter out Author:, Commit: and *by: lines
36 # cut off the email parts
37 # cut off spaces first and last on the line
38 # only count names with a space (ie more than one word)
39 # sort all unique names
40 # awk them into RELEASE-NOTES format
41 git log $start..HEAD | \
42 egrep '(Author|Commit|by):' | \
43 cut -d: -f2- | \
44 cut '-d<' -f1 | \
45 sed -e 's/^ //' -e 's/ $//g' | \
46 grep ' ' | \
47 sort -u |
48 awk '{
49  num++;
50  n = sprintf("%s%s%s,", n, length(n)?" ":"", $0);
51  #print n;
52  if(length(n) > 78) {
53    printf("  %s\n", p);
54    n=sprintf("%s,", $0);
55  }
56  p=n;
57
58 }
59
60  END {
61    printf("  %s\n", p);
62    printf("  (%d contributors)\n", num);
63  }
64
65 '