summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-02-28 05:13:51 -0800
committerXiao Pan <gky44px1999@gmail.com>2024-02-28 05:13:51 -0800
commitc9987f258af1bd4c62e3b27b879e8e14cfafdf86 (patch)
treefd44a82b4708478af64c3a645ede24afbf677794
parentcc052298172c999a68ea46cc0e7d7fa900eb8b45 (diff)
fix: use awk instead of nawk, some of my systems does not have nawk installed
-rwxr-xr-xsh/upd2
1 files changed, 1 insertions, 1 deletions
diff --git a/sh/upd b/sh/upd
index 85f969b..8d710c2 100755
--- a/sh/upd
+++ b/sh/upd
@@ -149,7 +149,7 @@ pac () {
aurpacs="$(echo "$aurout" | grep '^Aur' | cut -d' ' -f3-)"
# /usr/share/libalpm/hooks/rebuild-detector.hook has a line `NeedsTargets` shows it maybe checkrebuild only upgraded packages by `printf 'zoom\nminiconda3' | checkrebuild` instead of maybe check all by `checkrebuild`, so I think query pacman hook will be faster than run another `checkrebuild`
# notes about awk f=1 things see https://git.flylightning.xyz/public_archive_codes/tree/sh/mrt
- checkrebuild_pacs="$(echo "$pacout$aurout" | nawk '
+ checkrebuild_pacs="$(echo "$pacout$aurout" | awk '
/^\([0-9]+\/[0-9]+\) Checking which packages need to be rebuilt$/ {f=1; next}
# check ^:: to consider rebuild-detector.hook is the last hook to run, and $aurout start with ^::
/^\([0-9]+\/[0-9]+\) |^:: / {f=0}