summaryrefslogtreecommitdiff
path: root/rename_authors_manual.sh
blob: 43d6f6540bc08cfd71eca127d8c47116252fbbf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

# Resets AUTHOR to the COMMITTER. If it's wrong, it's wrong, we don't bother
# fixing things.
# List of broken committer names is in manual-author-reset

DEVS_PATH='/path/to/here/manual-author-reset'

MY_AUTHOR="$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>"
MY_AUTHOR="$(echo $MY_AUTHOR | tr -d '"[]')"

grep -q "$MY_AUTHOR" $DEVS_PATH
if [ $? == 0 ]; then
  echo "export GIT_AUTHOR_NAME=\"$GIT_COMMITTER_NAME\""
  echo "export GIT_AUTHOR_EMAIL=\"$GIT_COMMITTER_EMAIL\""
fi