From f3beae1cb69bf9e026538aa1589f6c45d4153dfc Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 21 May 2023 18:29:46 +0200 Subject: [PATCH] Use looping over the package list This avoids the situation where an unavailable package cancels the installation of all other packages in this step, resulting in an unusable system in the end. --- arch-setup/install.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/arch-setup/install.sh b/arch-setup/install.sh index bed30bfb..e767fd2b 100755 --- a/arch-setup/install.sh +++ b/arch-setup/install.sh @@ -240,17 +240,26 @@ done #uninstalling unused packages echo Uninstalling unused packages -sudo pacman -Rns - <"$setupdir/packages/uninstall.txt" +#sudo pacman -Rns - <"$setupdir/packages/uninstall.txt" +while read package; do + sudo pacman -Rns "$package" +done <"$setupdir/packages/uninstall.txt" echo Uninstalled unused packages #pacman programs echo Installing default pacman programs -sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" +#sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt" +while read package; do + sudo pacman -S --needed "$package" || echo "$package" >>notfoundpackages.txt +done <"$setupdir/packages/officialpkgs.txt" echo Installed official programs #install wine echo Installing wine -sudo pacman -S --needed - <"$setupdir/packages/winepkgs.txt" +#sudo pacman -S --needed - <"$setupdir/packages/winepkgs.txt" +while read package; do + sudo pacman -S --needed "$package" || echo "$package" >>notfoundpackages.txt +done <"$setupdir/packages/winepkgs.txt" echo Installed wine # install paru-bin with yay, or download paru from github