etc-git: Be sure that git status is not empty before sending a mail
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/pr Build encountered an error

This commit is contained in:
Benoît S. 2019-08-14 10:10:08 +02:00 committed by Benoît S
parent 8cc59a5a57
commit 76919c9649

View file

@ -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>