speedup full-system

This commit is contained in:
Tobias Powalowski 2023-08-02 22:06:09 +02:00
parent e9b9c3adf2
commit be904c4062

View file

@ -289,11 +289,17 @@ _full_system() {
_PACKAGES="$(pacman -Qqn)" _PACKAGES="$(pacman -Qqn)"
_COUNT=0 _COUNT=0
_PACKAGE_COUNT="$(pacman -Qqn | wc -l)" _PACKAGE_COUNT="$(pacman -Qqn | wc -l)"
# avoid running mkinitcpio
_SKIP="btrfs-progs cryptsetup device-mapper lvm2 mdadm mkinitcpio"
for i in ${_PACKAGES}; do for i in ${_PACKAGES}; do
if [[ "$((${_COUNT}*100/${_PACKAGE_COUNT}-4))" -gt 1 ]]; then if [[ "$((${_COUNT}*100/${_PACKAGE_COUNT}-4))" -gt 1 ]]; then
_progress "$((${_COUNT}*100/${_PACKAGE_COUNT}-4))" "Reinstalling all packages, installing ${i} now..." _progress "$((${_COUNT}*100/${_PACKAGE_COUNT}-4))" "Reinstalling all packages, installing ${i} now..."
fi fi
pacman -S --noconfirm ${i} >"${_LOG}" 2>&1 || exit 1 if echo "${_SKIP}" | grep -q ${i}; then
pacman -S --noscriptlet --noconfirm ${i} >"${_LOG}" 2>&1 || exit 1
else
pacman -S --noconfirm ${i} >"${_LOG}" 2>&1 || exit 1
fi
_COUNT="$((${_COUNT}+1))" _COUNT="$((${_COUNT}+1))"
done done
_progress "97" "Adding info/man-pages now..." _progress "97" "Adding info/man-pages now..."