From daa3ead1e1cd358fe8b056f5c1ff42788c50f152 Mon Sep 17 00:00:00 2001 From: shark Date: Sun, 5 May 2019 16:09:04 -0500 Subject: [PATCH] synchronous package list updates --- pmm.fish | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/pmm.fish b/pmm.fish index 2270e78..a114be3 100644 --- a/pmm.fish +++ b/pmm.fish @@ -25,33 +25,36 @@ function pmm for j in (brl list) if strat $j apt --version > /dev/null 2>&1 echo "Updating the"(set_color green) "$j"(set_color normal) "stratum." - sudo strat $j apt update + sudo strat -r $j apt update & end end for j in (brl list) if strat $j pacman --version > /dev/null 2>&1 echo "Updating the"(set_color green) "$j"(set_color normal) "stratum." - sudo strat $j pacman -Sy + sudo strat -r $j pacman -Sy & end end for j in (brl list) if strat $j xbps-install --version > /dev/null 2>&1 echo "Updating the"(set_color green) "$j"(set_color normal) "stratum." - sudo strat $j xbps-install -S + sudo strat -r $j xbps-install -S & end end for j in (brl list) if strat $j dnf --version > /dev/null 2>&1 echo "Updating the"(set_color green) "$j"(set_color normal) "stratum." - sudo strat $j dnf check-update + sudo strat -r $j dnf check-update & end end for j in (brl list) if strat $j emerge --version > /dev/null 2>&1 echo "Updating the"(set_color green) "$j"(set_color normal) "stratum." - sudo strat $j emerge --sync + sudo strat -r $j emerge --sync & end end + while jobs -q + wait (jobs -p) + end end if test "$u" = "1" for j in (brl list) @@ -62,7 +65,7 @@ function pmm set ncarg end echo "Upgrading the"(set_color green) "$j"(set_color normal) "stratum." - sudo strat $j apt upgrade $ncarg + sudo strat $j apt upgrade $ncarg end end for j in (brl list) @@ -73,7 +76,7 @@ function pmm set ncarg end echo "Upgrading the"(set_color green) "$j"(set_color normal) "stratum." - sudo strat $j pacman -Su $ncarg + sudo strat $j pacman -Su $ncarg end end for j in (brl list) @@ -84,7 +87,7 @@ function pmm set ncarg end echo "Upgrading the"(set_color green) "$j"(set_color normal) "stratum." - sudo strat $j xbps-install -u $ncarg + sudo strat $j xbps-install -u $ncarg end end for j in (brl list) @@ -101,17 +104,17 @@ function pmm for j in (brl list) if strat $j emerge --version > /dev/null 2>&1 echo "Upgrading the"(set_color green) "$j"(set_color normal) "stratum." - sudo strat $j emerge -uDU --keep-going --with-bdeps=y @world + sudo strat $j emerge -uDU --keep-going --with-bdeps=y @world end end for j in (brl list) if strat $j swupd --version > /dev/null 2>&1 echo "Upgrading the"(set_color green) "$j"(set_color normal) "stratum." - sudo strat $j swupd update + sudo strat $j swupd update end end echo "Upgrading the"(set_color green) "bedrock"(set_color normal) "stratum." - sudo brl update + sudo brl update end if test "$ins" = "1" for j in (brl list) @@ -223,4 +226,4 @@ function pmm end end end -end \ No newline at end of file +end