summaryrefslogtreecommitdiff
path: root/contrib/get-authors
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2009-12-17 21:05:15 +0000
committerMorgan Deters <mdeters@gmail.com>2009-12-17 21:05:15 +0000
commitdfcf7dba0b2d8ad6eb9d8540e92804e70205b8fb (patch)
tree6cc700c94a4a72e5f4b758803b079dfed059e054 /contrib/get-authors
parentfdc93191d331c6bd4a2934eb5cbeb18d78cb078d (diff)
update-copyright.pl now retrieves and incorporates author information from repository history; re-ran update-copyright.pl; cleaned up some things with make
Diffstat (limited to 'contrib/get-authors')
-rwxr-xr-xcontrib/get-authors33
1 files changed, 33 insertions, 0 deletions
diff --git a/contrib/get-authors b/contrib/get-authors
new file mode 100755
index 000000000..a42f8a25b
--- /dev/null
+++ b/contrib/get-authors
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# get-authors
+# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
+#
+# usage: get-authors [ files... ]
+#
+# This script uses svn to get the original author
+#
+
+while [ $# -gt 0 ]; do
+ f=$1
+ shift
+ original_author=
+ major_contributors=
+ minor_contributors=
+ total_lines=`wc -l "$f" | awk '{print$1}'`
+ original_author=`svn log -q --incremental "$f" | tail -1 | awk '{print$3}'`
+ svn blame "$f" | awk '{print$2}' | sort | uniq -c | sort -n |
+ ( while read lines author; do
+ pct=$((100*$lines/$total_lines))
+ if [ "$author" != "$original_author" ]; then
+ if [ $pct -gt 10 ]; then
+ major_contributors="${major_contributors:+$major_contributors, }$author"
+ else
+ minor_contributors="${minor_contributors:+$minor_contributors, }$author"
+ fi
+ fi
+ done; \
+ echo "$original_author"
+ echo "${major_contributors:-none}"
+ echo "${minor_contributors:-none}" )
+done
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback