sh.zio.backup: fix Bash colors fucking things up
parent
ed591f8641
commit
5f58607a4e
|
@ -193,7 +193,7 @@ function invoke_script() {
|
||||||
function trigger_notify() {
|
function trigger_notify() {
|
||||||
level="$1"
|
level="$1"
|
||||||
title="$2"
|
title="$2"
|
||||||
output="$(echo "$3" | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g")"
|
output="$(echo "$3" | sed -r "s/\x1B\[[0-9;]*[JKmsu]//g")"
|
||||||
#output="yo"
|
#output="yo"
|
||||||
notify_prog="/usr/local/bin/sh.zio.notify"
|
notify_prog="/usr/local/bin/sh.zio.notify"
|
||||||
|
|
||||||
|
@ -204,10 +204,8 @@ function trigger_notify() {
|
||||||
else
|
else
|
||||||
/usr/local/bin/sh.zio.notify \
|
/usr/local/bin/sh.zio.notify \
|
||||||
--level "$level" \
|
--level "$level" \
|
||||||
--message "$output" \
|
--message '```\\n'"${output//$'\n'/'\\n'}"'\\n```' \
|
||||||
--title "$title"
|
--title "$title"
|
||||||
|
|
||||||
#--message '```\\n'"${output//$'\n'/'\\n'}"'\\n```' \
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue