summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-02-26 01:57:53 -0800
committerXiao Pan <gky44px1999@gmail.com>2024-02-26 01:57:53 -0800
commit5bebd3f89188aa1288115067bde4129782cc094c (patch)
tree952ba1994afe2d0485e5c7ad31860a7117ad897a
parent7520cc110e496200cc0c65dca0524161ef2d8eaa (diff)
pac is both var and function name, so maybe change to another
-rwxr-xr-xsh/upd12
1 files changed, 6 insertions, 6 deletions
diff --git a/sh/upd b/sh/upd
index 9f0978e..85f969b 100755
--- a/sh/upd
+++ b/sh/upd
@@ -141,17 +141,17 @@ misc () {
}
pac () {
- pac="$(sudo pacman --noconfirm -Syu | tee /dev/tty)"
- pacpacs="$(echo "$pac" | grep -m1 '^Packages' | cut -d' ' -f3- | tee /dev/tty)"
+ pacout="$(sudo pacman --noconfirm -Syu | tee /dev/tty)"
+ pacpacs="$(echo "$pacout" | grep -m1 '^Packages' | cut -d' ' -f3- | tee /dev/tty)"
# Update rust toolchains before paru so paru can compile things in newest rust if needed.
rustup update
- aur="$(paru --color never --noconfirm -aSu --ignore libredwg-git)"
- aurpacs="$(echo "$aur" | grep '^Aur' | cut -d' ' -f3-)"
+ aurout="$(paru --color never --noconfirm -aSu --ignore libredwg-git)"
+ 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 "$pac$aur" | nawk '
+ checkrebuild_pacs="$(echo "$pacout$aurout" | nawk '
/^\([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 $aur start with ^::
+ # check ^:: to consider rebuild-detector.hook is the last hook to run, and $aurout start with ^::
/^\([0-9]+\/[0-9]+\) |^:: / {f=0}
f {
if($2!~"zoom|miniconda3")