summaryrefslogtreecommitdiff
path: root/rename_authors_manual.sh
blob: 32e4a388d367354b600ed39ad5570a1ebec184b4 (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='$(pwd)/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