Update warn-git-status to work from /.
This commit is contained in:
parent
6ac7c58fed
commit
9b4ac20589
1 changed files with 4 additions and 4 deletions
|
|
@ -1,10 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
source /etc/mail.conf "etc-git" || exit 1
|
||||
source /etc/mail.conf "git-status" || exit 1
|
||||
|
||||
ETCSTATUS="$(cd /etc && git status | egrep -ve "^(On branch|Your branch|No commits|nothing|$)" -e "\(use")"
|
||||
CONFIGSTATUS="$(cd / && 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")"
|
||||
|
||||
[[ -z "$ETCSTATUS" ]] && [[ -z "$TEMPLATESTATUS" ]] && exit 0
|
||||
[[ -z "$CONFIGSTATUS" ]] && [[ -z "$TEMPLATESTATUS" ]] && exit 0
|
||||
|
||||
mailx "${MAILX_ARGS[@]}" -r "$EMAIL_FROM" -s "/etc git status" "${EMAIL_TO[@]}" <<<"${ETCSTATUS:+$ETCSTATUS$'\n'$'\n'}$TEMPLATESTATUS"
|
||||
mailx "${MAILX_ARGS[@]}" -r "$EMAIL_FROM" -s "git statuses" "${EMAIL_TO[@]}" <<<"${CONFIGSTATUS:+$CONFIGSTATUS$'\n'$'\n'}$TEMPLATESTATUS"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue