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]
/
logmail
diff --git
a/logmail
b/logmail
index cac1e21372cb80389189987d2910279e125b235e..4aad395591d9f123072ef545e7d25f5cce937d53 100755
(executable)
--- a/
logmail
+++ b/
logmail
@@
-14,18
+14,18
@@
# 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 output or failure of CMD
EOF
usage: logmail CMD [ARGS...]
Send mail in case of output or failure of CMD
EOF
-
exit 0
-
;;
+ exit 0
+ ;;
esac
t=$(mktemp)
if ! "$@" &>"$t" || [[ ! -s $t ]]; then
esac
t=$(mktemp)
if ! "$@" &>"$t" || [[ ! -s $t ]]; then
-
mail -s "$HOSTNAME: $*" $USER@localhost <"$t"
-
rm "$t"
+ mail -s "$HOSTNAME: $*" $USER@localhost <"$t"
+ rm "$t"
fi
exit 0
fi
exit 0