Warn if /etc/slackpkg/templates has been updated.
This commit is contained in:
parent
40d328de10
commit
c9bd43cd25
1 changed files with 5 additions and 3 deletions
|
@ -2,8 +2,10 @@
|
||||||
|
|
||||||
source /etc/mail.conf "etc-git" || exit 1
|
source /etc/mail.conf "etc-git" || exit 1
|
||||||
|
|
||||||
cd /etc
|
ETCSTATUS="$(cd /etc && git status | egrep -ve "^(On branch|Your branch|No commits|nothing|$)" -e "\(use")"
|
||||||
|
TEMPLATESTATUS="$(cd /etc/slackpkg/templates && git status | egrep -ve "^(On branch|Your branch|No commits|nothing|$)" -e "\(use")"
|
||||||
|
|
||||||
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"
|
[[ ! -z "$ETCSTATUS" ]] || [[ ! -z "$TEMPLATESTATUS" ]] && {
|
||||||
|
|
||||||
|
mailx "${MAILX_ARGS[@]}" -r "$EMAIL_FROM" -s "/etc git status" "${EMAIL_TO[@]}" <<< "${ETCSTATUS:+$ETCSTATUS$'\n'}$TEMPLATESTATUS"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue