add failuretrace
This commit is contained in:
parent
70072fcb65
commit
161834d58c
1 changed files with 8 additions and 0 deletions
|
@ -1,6 +1,14 @@
|
|||
#!/bin/bash
|
||||
#debug
|
||||
|
||||
failure() {
|
||||
local lineno=$1
|
||||
local msg=$2
|
||||
echo "Failed at $lineno: $msg"
|
||||
}
|
||||
trap 'failure ${LINENO} "$BASH_COMMAND"' ERR
|
||||
|
||||
|
||||
# set SSHS to false, if not set
|
||||
if [ -z ${SSHS+x} ]; then export SSHS=false;fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue