[gimp] devel-docs: improve the statistics script.



commit 9df67e2134f9d8080468295902bb12bbb1a09cc4
Author: Jehan <jehan girinstud io>
Date:   Tue Jan 9 19:17:29 2018 +0100

    devel-docs: improve the statistics script.
    
    - Fix language count.
    - Update the commit message parsing for language name.
    - Add more files to be counted as "documentation".

 devel-docs/release-stats.sh |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/devel-docs/release-stats.sh b/devel-docs/release-stats.sh
index 6886389..4fd6039 100755
--- a/devel-docs/release-stats.sh
+++ b/devel-docs/release-stats.sh
@@ -76,8 +76,12 @@ echo "## TRANSLATIONS ##"
 echo
 #git --no-pager log --stat $PREV..$CUR -- po* | grep "Updated\? .* translation"|sed "s/ *Updated\? \(.*\) 
translation.*/\\1/" | sort | uniq | paste -s -d, | sed 's/,/, /g'
 
-i18n=`git --no-pager log --stat $PREV..$CUR -- po* | grep "Updated\? .* translation"|sed "s/ *Updated\? 
\(.*\) translation.*/\\1/" | sort | uniq`
+i18n=`git --no-pager log --stat $PREV..$CUR -- po* | grep "Updated\? .* \(translation\|language\)"`
+i18n=`printf "$i18n" | sed "s/ *Updated\? \(.*\) \(translation\|language\).*/\\1/" | sort | uniq`
 i18n_n=`printf "$i18n" | wc -l`
+# It seems that if the last line has no newline, wc does not count it.
+# Add one line manually.
+i18n_n=$(( $i18n_n + 1 ))
 i18n_comma=`printf "$i18n" | paste -s -d, | sed 's/,/, /g'`
 
 echo "$i18n_n translations were updated: $i18n_comma."
@@ -113,7 +117,7 @@ echo
 echo "## Documenters ##"
 echo
 
-git --no-pager shortlog -sn $PREV..$CUR -- docs/ devel-docs/
+git --no-pager shortlog -sn $PREV..$CUR -- docs/ devel-docs/ NEWS INSTALL.in "*README*" HACKING
 
 echo
 echo "## Build maintainers ##"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]