1
0
Fork 0
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:
Michael Carlberg 2016-05-25 14:48:37 +02:00
parent 609f56fb7a
commit d22bd48e8c

View file

@ -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