mirror of
https://github.com/polybar/polybar.git
synced 2024-11-18 13:55:11 -05:00
fix(wrapper.sh): Redirect stderr to both file and stdout
This commit is contained in:
parent
609f56fb7a
commit
d22bd48e8c
1 changed files with 3 additions and 1 deletions
|
@ -24,6 +24,8 @@ pipe="$(mktemp -u /tmp/lemonbuddy.in.XXXXX)"
|
||||||
|
|
||||||
[ -d "$logdir" ] || mkdir -p "$logdir"
|
[ -d "$logdir" ] || mkdir -p "$logdir"
|
||||||
|
|
||||||
|
exec 2> >(tee "$logfile")
|
||||||
|
|
||||||
mkfifo "$pipe"
|
mkfifo "$pipe"
|
||||||
|
|
||||||
cleanup_proc() {
|
cleanup_proc() {
|
||||||
|
@ -35,7 +37,7 @@ cleanup_proc() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# shellcheck disable=SC2094
|
# shellcheck disable=SC2094
|
||||||
{ lemonbuddy "$@" -p "$pipe" 2>"$logfile"; kill -TERM $$ 2>/dev/null; } | $lemonbar >"$pipe" &
|
{ lemonbuddy "$@" -p "$pipe"; kill -TERM $$ 2>/dev/null; } | $lemonbar >"$pipe" &
|
||||||
|
|
||||||
trap 'cleanup_proc $!' TERM INT
|
trap 'cleanup_proc $!' TERM INT
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue