2017-02-13 19:01:54 +00:00
|
|
|
#!/usr/bin/env bash
|
2016-05-29 04:08:20 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# This script generates a gitdm compatible email aliases file from a git
|
|
|
|
# formatted .mailmap file.
|
|
|
|
#
|
|
|
|
# Usage:
|
|
|
|
# $> ./generate_aliases <mailmap_file> > aliases
|
|
|
|
#
|
|
|
|
|
2020-03-03 03:27:49 +00:00
|
|
|
cat $1 \
|
|
|
|
| grep -v '^#' \
|
|
|
|
| sed 's/^[^<]*<\([^>]*\)>/\1/' \
|
|
|
|
| grep '<.*>' | sed -e 's/[<>]/ /g' \
|
|
|
|
| awk '{if ($3 != "") { print $3" "$1 } else {print $2" "$1}}' \
|
|
|
|
| sort | uniq
|