1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/contrib/gitdm/generate_aliases.sh
Akihiro Suda 3cf82748dd run shfmt
git grep --name-only '^#!' | egrep -v '(vendor|\.go|Jenkinsfile)' | xargs shfmt -w -bn -ci -sr

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-03 12:27:49 +09:00

16 lines
369 B
Bash
Executable file

#!/usr/bin/env bash
#
# This script generates a gitdm compatible email aliases file from a git
# formatted .mailmap file.
#
# Usage:
# $> ./generate_aliases <mailmap_file> > aliases
#
cat $1 \
| grep -v '^#' \
| sed 's/^[^<]*<\([^>]*\)>/\1/' \
| grep '<.*>' | sed -e 's/[<>]/ /g' \
| awk '{if ($3 != "") { print $3" "$1 } else {print $2" "$1}}' \
| sort | uniq