diff --git a/TODO b/TODO index 2764923..d41f101 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,6 @@ Before new_layout branch merge ============================== * README.md update (pull-request #145) -* Script to automatically update file contents: - contributors : AUTHORS After new_layout merge diff --git a/devscripts/update-authors.sh b/devscripts/update-authors.sh new file mode 100755 index 0000000..e7919a8 --- /dev/null +++ b/devscripts/update-authors.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Author: Sotiris Papadopoulos +# Last-Revision: 2017-04-17 +# Script to update the AUTHORS file +# +# Usage: ./update-authors.sh + +cd .. + +git log --reverse --format="%aN <%aE>" | python -c " + +import sys + +authors = set() + +sys.stdout.write('# Authors ordered by first contribution.\n\n') + +for line in sys.stdin: + username, _ = line.split('<') + + if username not in authors: + authors.add(username) + sys.stdout.write(line) + +sys.stdout.write('\n# Generated by update-authors.sh script\n') +" > AUTHORS