summaryrefslogtreecommitdiffstats
path: root/tools/mail_error
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mail_error')
-rwxr-xr-xtools/mail_error3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/mail_error b/tools/mail_error
index 4349c21d..184827e9 100755
--- a/tools/mail_error
+++ b/tools/mail_error
@@ -13,10 +13,9 @@ while getopts "o:m:" c; do
13 esac 13 esac
14done 14done
15shift $(($OPTIND-1)) 15shift $(($OPTIND-1))
16echo "output_file=$output_file email=$email"
17 16
18[[ -z $1 ]] && die "Must specify command" 17[[ -z $1 ]] && die "Must specify command"
19 18
20if ! "$@" > $output_file 2>&1 ; then 19if ! "$@" > $output_file 2>&1 ; then
21 mail -s "mail_error fail: $@" $email < $output_file 20 mail -s "mail_error fail: $1" $email < $output_file
22fi 21fi