From 789de29893c87d5368f638fce73caf7da5cbd17b Mon Sep 17 00:00:00 2001 From: James Barnett Date: Wed, 31 May 2017 12:54:19 -0400 Subject: [PATCH] use error() --- bin/snap-sync | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/snap-sync b/bin/snap-sync index 8e7a002..5688b0a 100755 --- a/bin/snap-sync +++ b/bin/snap-sync @@ -41,7 +41,7 @@ die() { } traperror() { - out "==> ERROR: Exited due to error on line" $1 + error "Exited due to error on line $1" out "exit status:" "$2" out "command:" "$3" out "bash line:" "$4" @@ -58,6 +58,9 @@ trapkill() { trap 'traperror ${LINENO} $? "$BASH_COMMAND" $BASH_LINENO "${FUNCNAME[@]}"' ERR trap trapkill SIGTERM SIGINT + +echo foo | grep bar + notify_info() { for u in $(users); do sudo -u $u DISPLAY=:0 \