summaryrefslogtreecommitdiff
path: root/get_contributors.sh
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2017-05-31 20:07:07 +0200
committervarac <varacanero@zeromail.org>2017-05-31 20:07:07 +0200
commitea3795879da3502b14577144466ff9d35d4eb358 (patch)
tree2ddaccec9cbec304d4178a0248008ca176420ffa /get_contributors.sh
parentbb2fa4f700439f10ccd05c38cf42f701fcc6463a (diff)
Add script to list all LEAP contributors
Diffstat (limited to 'get_contributors.sh')
-rwxr-xr-xget_contributors.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/get_contributors.sh b/get_contributors.sh
new file mode 100755
index 0000000..175ecc4
--- /dev/null
+++ b/get_contributors.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# Script to generate a list of contributors
+
+REPOS=(bitmask_android bitmask_client bitmask-dev bonafide couchdb_scripts couchrest_changes deploy_test dl_bitmask_net docker faith Infrastructure junit keymanager leap_assets leap_ca leap_cli leap_client_dist leap_client_launcher leap_cloudadmin leap_db leap_mail leap_mx leap_pistonadmin leap_platform leap_platform_gource leap_presentations leap_pycommon leap_se leap_vagrant leap_web leap_website lut mail_breaker minimal-debian-vagrant nickserver platform_test pysqlcipher reserve_usernames ruby_srp scripts soledad tapicero )
+
+# shellcheck disable=SC2016
+GET_CONTRIBUTORS='git log --use-mailmap --format="%aN <%aE>" | awk "{arr[\$0]++} END{for (i in arr){print arr[i], i;}}" | sort -rn | cut -d" " -f2- | sort'
+ROOTDIR="${HOME}/leap/git"
+LISTFILE='/tmp/contributors.txt'
+
+# optional specify core team memebers to filter out
+TEAM='(email@of.contributor.org|email@of_other_contributor.net)'
+
+[ -e ${LISTFILE} ] && rm ${LISTFILE}
+[ -e ${LISTFILE}.tmp ] && rm ${LISTFILE}.tmp
+
+for repo in "${REPOS[@]}"
+do
+ cd "${ROOTDIR}/${repo}" || exit 1
+ contributors=$(eval "$GET_CONTRIBUTORS" | egrep -iv "$TEAM")
+ if [ -n "$contributors" ]
+ then
+ echo "${repo}:"
+ echo "$contributors" | tee -a ${LISTFILE}.tmp
+ echo
+ echo
+ fi
+done
+
+
+sort < "${LISTFILE}.tmp" | uniq > "${LISTFILE}"
+rm "${LISTFILE}.tmp"
+echo "Complete list of contributors is at ${LISTFILE}"