###########################################################################
#
-# This script shows all mentioned contributors from <hash> until HEAD and
-# puts them at the end of the THANKS document on stdout
+# This script updates the docs/THANKS document.
#
set -eu
echo "Usage: $0 <since this tag/hash>"
exit
fi
+if test "$start" = "stdout"; then
+ # output the names on stdout
+ use_stdout="yes"
+ start=""
+else
+ use_stdout="no";
+fi
if test -z "$start"; then
start=$(git tag --sort=taggerdate | grep "^curl-" | tail -1)
fi
sort -fu | \
grep -aixvFf ./docs/THANKS >> $rand
-# output header
-cat <<EOF >./docs/THANKS
+if test "$use_stdout" = "no"; then
+
+ # output header
+ cat <<EOF >./docs/THANKS
This project has been alive for many years. Countless people have provided
feedback that have improved curl. Here follows a list of people that have
contributed (a-z order).
If you have contributed but are missing here, please let us know!
EOF
-# append all the names, sorted case insensitively
-grep -v "^ " $rand | sort -f $rand >> ./docs/THANKS
+ # append all the names, sorted case insensitively
+ grep -v "^ " $rand | sort -f $rand >> ./docs/THANKS
+else
+ # send all names on stdout
+ grep -v "^ " $rand | sort -f $rand
+fi
# get rid of the temp file
rm $rand
$ncommitters = $acommitters - $bcommitters;
# number of contributors right now
-$acontribs = `./scripts/contrithanks.sh | grep -c '^[^ ]'`;
+$acontribs = `./scripts/contrithanks.sh stdout | wc -l`;
# number when the tag was set
$bcontribs = `git show $start:docs/THANKS | grep -c '^[^ ]'`;
# delta