diff options
author | Morgan Deters <mdeters@gmail.com> | 2009-12-17 21:05:15 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2009-12-17 21:05:15 +0000 |
commit | dfcf7dba0b2d8ad6eb9d8540e92804e70205b8fb (patch) | |
tree | 6cc700c94a4a72e5f4b758803b079dfed059e054 /contrib/get-authors | |
parent | fdc93191d331c6bd4a2934eb5cbeb18d78cb078d (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-x | contrib/get-authors | 33 |
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 |