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