From e314a3d23610ac5b981d791e657835451219d45a Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Fri, 1 Mar 2024 16:24:23 -0800 Subject: fix: consider util-linux --- sh/upd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh/upd b/sh/upd index c05078b..8225e3f 100755 --- a/sh/upd +++ b/sh/upd @@ -175,12 +175,13 @@ pac () { systemctl list-unit-files --state=enabled > "$XDG_CONFIG_HOME/myconf/sye" systemctl --user list-unit-files --state=enabled > "$XDG_CONFIG_HOME/myconf/syue" # pacdiff default use pacman database, so no need `sudo -E` for find, but will be a little bit slower + # [^-] consider util-linux; \(^\|[^-]\) consider linux is the first package, ex: pacout is only 'linux-6.6.6' log="$log updated pacman packages: $pacpacs updated aur packages: $aurpacs pacdiff: $(pacdiff -o | tr '\n' ' ') checkrebuild: $checkrebuild_pacs -$(if echo "$pacpacs" | grep -q 'linux-\(megi-\)\?[0-9]'; then echo 'kernel upgraded, need reboot'; fi) +$(if echo "$pacpacs" | grep -q '\(^\|[^-]\)linux-\(megi-\)\?[0-9]'; then echo 'kernel upgraded, need reboot'; fi) " } -- cgit v1.2.3-70-g09d2