Home | History | Annotate | Download | only in scripts
      1 #!/bin/sh
      2 #***************************************************************************
      3 #                                  _   _ ____  _
      4 #  Project                     ___| | | |  _ \| |
      5 #                             / __| | | | |_) | |
      6 #                            | (__| |_| |  _ <| |___
      7 #                             \___|\___/|_| \_\_____|
      8 #
      9 # Copyright (C) 2013-2016, Daniel Stenberg, <daniel (at] 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 
     29 start=$1
     30 
     31 if test -z "$start"; then
     32   echo "Usage: $0 <since this tag/hash>"
     33 fi
     34 
     35 cat ./docs/THANKS
     36 
     37 (
     38 git log $start..HEAD | \
     39 egrep -ai '(^Author|^Commit|by):' | \
     40 cut -d: -f2- | \
     41 cut '-d<' -f1 | \
     42 tr , '\012' | \
     43 sed 's/ and /\n/' | \
     44 sed -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
     49 grep -a "^  [^ (]" RELEASE-NOTES| \
     50 sed 's/, */\n/g'| \
     51 sed 's/^ *//'
     52 
     53 )| \
     54 sed -f ./docs/THANKS-filter | \
     55 grep -a ' ' | \
     56 sort -fu | \
     57 grep -aixvf ./docs/THANKS
     58