func trapExit: cleanup printf formatting
This commit is contained in:
parent
bbea5e871c
commit
44e57df831
@ -198,12 +198,12 @@ newline() {
|
|||||||
|
|
||||||
# same as exitError but for signal captures
|
# same as exitError but for signal captures
|
||||||
trapExit () {
|
trapExit () {
|
||||||
printf "${err}[%s] -- [ERROR] 99: Caught signal --${norm}\n" \
|
printf "%s[%s] -- [ERROR] 99: Caught signal --%s\n" \
|
||||||
"$(stamp)" >> "$logFile"
|
"$err" "$(stamp)" "$norm" >> "$logFile"
|
||||||
cleanup
|
cleanup
|
||||||
# note script completion with error
|
# note script completion with error
|
||||||
printf "${err}[%s] --- %s execution was terminated via signal ---${norm}\n" \
|
printf "%s[%s] --- %s execution was terminated via signal ---%s\n" \
|
||||||
"$(stamp)" "$scriptName" >> "$logFile"
|
"$err" "$(stamp)" "$scriptName" "$norm" >> "$logFile"
|
||||||
exit 99
|
exit 99
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user