summaryrefslogtreecommitdiffstats
path: root/hacking/authors.sh
diff options
context:
space:
mode:
authorMichael DeHaan <michael.dehaan@gmail.com>2013-02-27 04:05:17 +0100
committerMichael DeHaan <michael.dehaan@gmail.com>2013-02-27 04:05:17 +0100
commitfa550f3d7ee585a1d7c3b726c24592f1a714130b (patch)
tree6a6e6ddee441ba7374b5308ef08945c89da6c46b /hacking/authors.sh
parentbaby-JSON not supported, let selinux module warn using regular JSON (diff)
downloadansible-fa550f3d7ee585a1d7c3b726c24592f1a714130b.tar.xz
ansible-fa550f3d7ee585a1d7c3b726c24592f1a714130b.zip
Adding a script to auto-generate an authors file, runnable from 'make authors', which is called from 'make docs/webdocs'.
Diffstat (limited to 'hacking/authors.sh')
-rw-r--r--hacking/authors.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/hacking/authors.sh b/hacking/authors.sh
new file mode 100644
index 0000000000..f9287828e4
--- /dev/null
+++ b/hacking/authors.sh
@@ -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