From b13fd421248f3fc625544aaabdd49e1573c5dbf9 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 28 Feb 2017 22:10:49 -0800 Subject: [PATCH] nightly/conf/nightly.sendmail: Use mail if mutt is not available --- nightly/conf/nightly.sendmail | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/nightly/conf/nightly.sendmail b/nightly/conf/nightly.sendmail index d28790ff3..7960ceb77 100755 --- a/nightly/conf/nightly.sendmail +++ b/nightly/conf/nightly.sendmail @@ -19,10 +19,14 @@ do esac done -if [ $# -ge 3 ]; then - gzip -9 <"$3" >"$3.gz" - mutt -s "$1" -a "$3.gz" ${recipients} < "$2" - rm -f "$3.gz" +if type mutt >/dev/null 2>&1; then + if [ $# -ge 3 ]; then + gzip -9 <"$3" >"$3.gz" + mutt -s "$1" -a "$3.gz" ${recipients} < "$2" + rm -f "$3.gz" + else + mutt -s "$1" ${recipients} < "$2" + fi else - mutt -s "$1" ${recipients} < "$2" + mail -s "$1" ${recipients} < "$2" fi