iankelling.org
/
git
/
log-quiet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change indent level to 2
[log-quiet]
/
failmail
diff --git
a/failmail
b/failmail
index 703e13038d6c7428d32e9c4a3f21f6d84966317b..377564e294b6d5a038b1bec39352f84de32ace15 100755
(executable)
--- a/
failmail
+++ b/
failmail
@@
-14,19
+14,19
@@
# limitations under the License.
case $1 in
# limitations under the License.
case $1 in
-
-h|--help)
-
cat <<'EOF'
+ -h|--help)
+ cat <<'EOF'
usage: logmail CMD [ARGS...]
Send mail in case of failure of CMD
EOF
usage: logmail CMD [ARGS...]
Send mail in case of failure of CMD
EOF
-
exit 0
-
;;
+ exit 0
+ ;;
esac
t=$(mktemp)
if ! "$@" &>"$t"; then
esac
t=$(mktemp)
if ! "$@" &>"$t"; then
-
mail -s "$HOSTNAME: $*" $USER@localhost <"$t"
-
rm "$t"
+ mail -s "$HOSTNAME: $*" $USER@localhost <"$t"
+ rm "$t"
fi
exit 0
fi
exit 0