Adding a script to auto-generate an authors file, runnable from 'make authors', which is called from 'make docs/webdocs'.

This commit is contained in:
Michael DeHaan
2013-02-26 22:05:17 -05:00
parent 7dbfad8225
commit fa550f3d7e
3 changed files with 233 additions and 1 deletions

14
hacking/authors.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
# script from http://stackoverflow.com/questions/12133583
set -e
# Get a list of authors ordered by number of commits
# and remove the commit count column
AUTHORS=$(git --no-pager shortlog -nse | cut -f 2-)
if [ -z "$AUTHORS" ] ; then
echo "Authors list was empty"
exit 1
fi
# Display the authors list and write it to the file
echo "$AUTHORS" | tee "$(git rev-parse --show-toplevel)/AUTHORS.TXT" | sort