use error()
This commit is contained in:
@@ -41,7 +41,7 @@ die() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
traperror() {
|
traperror() {
|
||||||
out "==> ERROR: Exited due to error on line" $1
|
error "Exited due to error on line $1"
|
||||||
out "exit status:" "$2"
|
out "exit status:" "$2"
|
||||||
out "command:" "$3"
|
out "command:" "$3"
|
||||||
out "bash line:" "$4"
|
out "bash line:" "$4"
|
||||||
@@ -58,6 +58,9 @@ trapkill() {
|
|||||||
trap 'traperror ${LINENO} $? "$BASH_COMMAND" $BASH_LINENO "${FUNCNAME[@]}"' ERR
|
trap 'traperror ${LINENO} $? "$BASH_COMMAND" $BASH_LINENO "${FUNCNAME[@]}"' ERR
|
||||||
trap trapkill SIGTERM SIGINT
|
trap trapkill SIGTERM SIGINT
|
||||||
|
|
||||||
|
|
||||||
|
echo foo | grep bar
|
||||||
|
|
||||||
notify_info() {
|
notify_info() {
|
||||||
for u in $(users); do
|
for u in $(users); do
|
||||||
sudo -u $u DISPLAY=:0 \
|
sudo -u $u DISPLAY=:0 \
|
||||||
|
|||||||
Reference in New Issue
Block a user