From 16175dbe5878ada4d23c76c65662c614b03f7659 Mon Sep 17 00:00:00 2001 From: mglocker Date: Sun, 24 Jan 2021 15:41:37 +0000 Subject: [PATCH] Fix the baraction.sh example script to display current statistics from iostat(8). ok gonzalo@ --- x11/spectrwm/Makefile | 4 ++-- x11/spectrwm/patches/patch-baraction_sh | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 x11/spectrwm/patches/patch-baraction_sh diff --git a/x11/spectrwm/Makefile b/x11/spectrwm/Makefile index 8957ed86498..f0a97f61208 100644 --- a/x11/spectrwm/Makefile +++ b/x11/spectrwm/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.36 2021/01/23 18:34:17 bket Exp $ +# $OpenBSD: Makefile,v 1.37 2021/01/24 15:41:37 mglocker Exp $ COMMENT= small tiling window manager @@ -8,7 +8,7 @@ GH_PROJECT= spectrwm GH_TAGNAME= SPECTRWM_${V:S/./_/g} DISTNAME= ${GH_PROJECT}-${V} -REVISION= 0 +REVISION= 1 SHARED_LIBS= swmhack 1.0 diff --git a/x11/spectrwm/patches/patch-baraction_sh b/x11/spectrwm/patches/patch-baraction_sh new file mode 100644 index 00000000000..3e1a7353139 --- /dev/null +++ b/x11/spectrwm/patches/patch-baraction_sh @@ -0,0 +1,14 @@ +$OpenBSD: patch-baraction_sh,v 1.1 2021/01/24 15:41:38 mglocker Exp $ + +Index: baraction.sh +--- baraction.sh.orig ++++ baraction.sh +@@ -84,7 +84,7 @@ print_bat() { + APM_DATA="" + I=0 + while :; do +- IOSTAT_DATA=`/usr/sbin/iostat -C | grep '[0-9]$'` ++ IOSTAT_DATA=`/usr/sbin/iostat -C -c 2 | tail -n 1 | grep '[0-9]$'` + if [ $I -eq 0 ]; then + APM_DATA=`/usr/sbin/apm -alb` + fi