system-configs/etc/cron.daily/warn-git-status

9 lines
300 B
Bash
Executable file

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