2013-02-26 22:05:17 -05:00
|
|
|
#!/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
|
2013-03-25 23:36:53 -04:00
|
|
|
AUTHORS=$(git --no-pager shortlog -nse | cut -f 2- | sort -f)
|
2013-02-26 22:05:17 -05:00
|
|
|
if [ -z "$AUTHORS" ] ; then
|
|
|
|
echo "Authors list was empty"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Display the authors list and write it to the file
|
2013-03-25 23:36:53 -04:00
|
|
|
echo "$AUTHORS" | tee "$(git rev-parse --show-toplevel)/AUTHORS.TXT"
|