#!/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}"