9 lines
278 B
Bash
Executable file
9 lines
278 B
Bash
Executable file
#!/bin/bash
|
|
|
|
source /etc/mail.conf "etc-git" || exit 1
|
|
|
|
cd /etc
|
|
|
|
OUTPUT="$(git status | egrep -ve "^(On branch|Your branch|No commits|nothing|$)" -e "\(use")"
|
|
|
|
[[ ! -z "$OUTPUT" ]] && mailx "${MAILX_ARGS[@]}" -r "$EMAIL_FROM" -s "/etc git status" "${EMAIL_TO[@]}" <<< "$OUTPUT"
|