summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2016-01-24 03:43:22 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2016-01-24 03:45:46 +0100
commit942698cabd574a232a39301b471dc7da38dd11c7 (patch)
tree92b61a48a1ba629c26f518a65823fa28e519f6cf
parent31e9b43427510466c845e83e026959217a92e50c (diff)
Little shell wrapper to run all stat configs separately
-rwxr-xr-xmkstats.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/mkstats.sh b/mkstats.sh
new file mode 100755
index 00000000..5889eca5
--- /dev/null
+++ b/mkstats.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+run_stats ()
+{
+ mr_config=$1
+ topic=${mr_config#mr-}
+ topic=${topic%.config}
+ output_dir=`pwd`/stats-$topic-`date -u +'%Y-%m-%d'`
+
+ -d $output_dir || mkdir $output_dir || exit 1
+
+ # update/clone repos
+ ./mr -c $mr_config update
+
+ # warning: though the -M option is yielding more accurate stats, if you
+ # need strictly backwards-comparable results, leave it out!
+ ./mr -c $mr_config log -p -M --since='Jan 1 19:00:00 2013' | ../gitdm/gitdm -u -X '\.(sdf|po|dic)\$' -b . -x $output_dir/git-hackers-data.csv -o $output_dir/git-hackers-reports.txt -H $output_dir/hackers.csv || exit 1
+
+ # fudge unknown affiliations
+ for item in $output_dir/git-hackers-data.csv $output_dir/hackers.csv; do
+ sed -i.bak 's/(Unknown)/Assigned/' $item || exit 1
+ done
+}
+
+# run all known stats
+#for item in mr-*.config; do
+for item in mr-legacydev.config; do
+ run_stats $item
+done