diff options
Diffstat (limited to 'contrib/get-authors')
-rwxr-xr-x | contrib/get-authors | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/get-authors b/contrib/get-authors index f25c43989..34cb6b345 100755 --- a/contrib/get-authors +++ b/contrib/get-authors @@ -13,12 +13,15 @@ gituser="`git config user.name` <`git config user.email`>" while [ $# -gt 0 ]; do f=$1 shift - if ! grep -q " \*\* Top contributors" "$f" + if ! grep -q " Top contributors" "$f" then header_lines=0 else header_lines=$(grep "\*\*\/" "$f" -m 1 -n | cut -d ':' -f 1) - if [ -z $header_lines ]; then header_lines=0; fi + if [ -z $header_lines ]; then + header_lines=$(grep "^##$" "$f" -m 3 -n | tail -n 1 | cut -d ':' -f 1) + [ -z "$header_lines" ] && header_lines=0; + fi fi ((header_lines++)) total_lines=$(wc -l "$f" | awk '{print$1}') |