etc-git: Be sure that git status is not empty before sending a mail
This commit is contained in:
parent
8cc59a5a57
commit
76919c9649
|
@ -34,7 +34,8 @@ fi
|
||||||
|
|
||||||
# Send the mail if git status not empty
|
# Send the mail if git status not empty
|
||||||
git --git-dir=/etc/.git --work-tree=/etc status --short > $gitOutput
|
git --git-dir=/etc/.git --work-tree=/etc status --short > $gitOutput
|
||||||
if [ $gitOuput -n ]; then
|
gitOutputNumber=$(wc -l $gitOutput | awk '{ print $1 }')
|
||||||
|
if [ $gitOutputNumber -gt 0 ]; then
|
||||||
cat << EOT > $template
|
cat << EOT > $template
|
||||||
Content-Type: text/plain; charset="utf-8"
|
Content-Type: text/plain; charset="utf-8"
|
||||||
Reply-To: Équipe Evolix <equipe@evolix.fr>
|
Reply-To: Équipe Evolix <equipe@evolix.fr>
|
||||||
|
|
Loading…
Reference in a new issue