mausezahn: use getopt_long instead of getopt
[netsniff-ng-new.git] / contrib / extract-authors.sh
blob486e906112b81edbe5bce4682e367cad6b8930c6
1 #!/bin/bash
3 # Based on
4 # https://github.com/cilium/cilium/blob/master/contrib/scripts/extract_authors.sh
6 function extract_authors() {
7 authors=$(git shortlog --summary | awk '{$1=""; print $0}' | sed -e 's/^ //')
8 IFS=$'\n'
9 for i in $authors; do
10 name=$(git log --use-mailmap --author="$i" --format="%aN" | head -1)
11 mail=$(git log --use-mailmap --author="$i" --format="%aE" | head -1)
12 printf ' * %s <%s>\n' "$name" "$mail"
13 done
16 extract_authors | uniq | sort