-
Notifications
You must be signed in to change notification settings - Fork 0
/
.git_author
28 lines (23 loc) · 811 Bytes
/
.git_author
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
# git author environment variables
if [ -z "${NO_GIT_AUTHOR:-}" ]
then
domain="$(hostname -d)"
hostname="$(hostname)"
GIT_AUTHOR_NAME="Felix Jacobi"
GIT_COMMITTER_NAME="Felix Jacobi"
GIT_AUTHOR_EMAIL="Felix@jacobi-hamburg.net"
GIT_COMMITTER_EMAIL="Felix@jacobi-hamburg.net"
# Check if we are committing on my workplace
# Suppress on macOS, does not work anyway
if ! uname -a | grep -q Darwin && echo "$domain" | grep -qE '(^|\.)iserv\.(eu|dev)$' || echo "$domain" | grep -qE '(^|\.)mein-iserv\.de$' &&
! echo "$domain" | grep -qE '(^|\.)felix.iserv.dev$'
then
GIT_AUTHOR_EMAIL="felix.jacobi@iserv.eu"
GIT_COMMITTER_EMAIL="felix.jacobi@iserv.eu"
fi
export GIT_AUTHOR_NAME
export GIT_COMMITTER_NAME
export GIT_AUTHOR_EMAIL
export GIT_COMMITTER_EMAIL
fi