🧹 cleanup offline install

This commit is contained in:
Vladislav Nepogodin committed 2023-03-04 02:40:58 +04:00
1 parent c996cf5bfe
commit cb1174f27e
1 file changed
+5 -7
+5 -7
View File
@@ -19,6 +19,9 @@ _clean_packages() {
local _packages_to_remove=( local _packages_to_remove=(
gparted gparted
grsync grsync
cachyos-calamares-grub
cachyos-calamares-systemd
cachyos-calamares-refind
cachyos-calamares cachyos-calamares
cachyos-calamares-config cachyos-calamares-config
edk2-shell edk2-shell
@@ -39,21 +42,16 @@ local _packages_to_remove=(
mkinitcpio-archiso mkinitcpio-archiso
) )
local _nvidia_packages_to_remove=(nvidia-dkms nvidia-utils)
local _check_nvidia_card="$(mhwd --is_nvidia_card | grep -q 'NVIDIA card found!'; echo $?)" local _check_nvidia_card="$(mhwd --is_nvidia_card | grep -q 'NVIDIA card found!'; echo $?)"
if [[ "${_check_nvidia_card}" -ne 0 ]]; then if [[ "${_check_nvidia_card}" -ne 0 ]]; then
echo "No NVIDIA card detected. Removing nvidia drivers" echo "No NVIDIA card detected. Removing nvidia drivers"
_packages_to_remove+=(nvidia-dkms nvidia-utils egl-wayland)
local xx
# @ does one by one to avoid errors in the entire process
for xx in "${_nvidia_packages_to_remove[@]}"; do pacman -Rc "$xx" --noconfirm; done
fi fi
local xx local xx
# @ does one by one to avoid errors in the entire process # @ does one by one to avoid errors in the entire process
# taken from Erik Dubois script # taken from Erik Dubois script
for xx in "${_packages_to_remove[@]}"; do pacman -Rsc "$xx" --noconfirm; done for xx in "${_packages_to_remove[@]}"; do pacman -Rsnc "$xx" --noconfirm; done
} }
_clean_packages _clean_packages