From e8c094488a3666e849201e164f0b3e05c9e59a8e Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Mon, 4 Mar 2024 15:07:10 -0800 Subject: fix: workaround paru color output --- sh/upd | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sh/upd') diff --git a/sh/upd b/sh/upd index 60102a4..d019caf 100755 --- a/sh/upd +++ b/sh/upd @@ -152,11 +152,10 @@ pac () { # about `/^(\(|:|=)/ {f=0}`: # - consider $aurout start with `^:: Looking for devel upgrades...` , rebuild-detector.hook maybe the last hook to run for $pacout # - consider ^(4/5), the hook is not the last - # - consider paru `==> Making package: ...`, the hook maybe followed by this - # - here is also a more complex one: `/^\([0-9]+\/[0-9]+\) |^:: |^==> [A-Z]/ {f=0}` + # - consider paru `==> Making package: ...`, the hook maybe followed by this. Note: paru somehow still gives colro output even if I use --color never, so I can't check with ^=, so I choose to check with ==> checkrebuild_pacs="$(echo "$pacout$aurout" | awk ' /^\([0-9]+\/[0-9]+\) Checking which packages need to be rebuilt$/ {f=1; next} - /^(\(|:|=)/ {f=0} + /^(\(|:)|==>/ {f=0} f { if($2!~"zoom|miniconda3") printf("%s ",$2) -- cgit v1.2.3-70-g09d2