X-Git-Url: https://git.treefish.org/~alex/backmeupscotty.git/blobdiff_plain/a99ff50052a9c693c998e985ec526947e489141f..f877daff4c14c12d44baca7c0abe84ffc424057f:/backmeupscotty?ds=inline diff --git a/backmeupscotty b/backmeupscotty index 80392a3..1df23cd 100644 --- a/backmeupscotty +++ b/backmeupscotty @@ -10,7 +10,7 @@ _ERROR_ENCOUNTERED=0 _UPPERME=$(echo $(basename $0) | tr '[:lower:]' '[:upper:]') function timestamp { - date +"[%y-%m-%d %H:%M:%S]" + date +'[%y-%m-%d|%H:%M:%S]' } function scottyline { @@ -18,7 +18,7 @@ function scottyline { } function scottyinfo { - if ($_ERROR_ENCOUNTERED -eq 0); then + if [ $_ERROR_ENCOUNTERED -eq 0 ]; then scottyline $@ else scottyline $@ >&2 @@ -27,7 +27,10 @@ function scottyinfo { function scottyerror { scottyline $@ >&2 - _ERROR_ENCOUNTERED=1 + if [ $_ERROR_ENCOUNTERED -eq 0 ]; then + _ERROR_ENCOUNTERED=1 + scottyline "Going into verbose mode after error encounter." >&2 + fi } function ssh255 {