updated update function with cache clear/skip of pacman cache

This commit is contained in:
yuriy 2023-11-22 00:23:04 -05:00
parent d640a50b17
commit 3bc2b894c9

18
.bashrc
View File

@ -146,7 +146,7 @@ UpdateAURPackages() {
psyu() { psyu() {
# Updates all packages in the system. # Updates all packages in the system.
# Upstream (i.e. Arch) packages are updated first. # Upstream (i.eUpdate. Arch) packages are updated first.
# If there are Arch updates, you should run # If there are Arch updates, you should run
# this function a second time to update # this function a second time to update
# the AUR packages too. # the AUR packages too.
@ -366,13 +366,17 @@ parul(){
update() { update() {
# echo "Updating Parcman Packages:" paru -Sy archlinux-keyring chaotic-keyring endeavouros-keyring --noconfirm --needed # update keyrings
# pacman -Sy archlinux-keyring ; paru -Syu --noconfirm # update packages, no confirmation
# paru -Syu
# echo "Updating Parcman Packages:" # Skip clearing update cache if this is Flexo Server
# sudo pacman -Sy archlinux-keyring chaotic-keyring endeavouros-keyring --noconfirm;paru -Syu --noconfirm;sudo pacman -Scc --noconfirm if [[ $(hostname) == "EOS-SERVER" ]]; then
sudo pacman -Sy archlinux-keyring chaotic-keyring endeavouros-keyring --noconfirm --needed ; paru -Syu --noconfirm --needed ; echo $(sudo ls /var/cache/pacman/pkg/ | wc -l) packages in cache echo "Skipping Clearing Update Cache"
else
echo "Clearing out Pacman Cache"
echo clearing out $(sudo ls /var/cache/pacman/pkg/ | wc -l) packages in cache
( echo "y"; echo "y" ) | paru -Scc
fi
echo "Updating Flatpak packages:" echo "Updating Flatpak packages:"
flatpak update flatpak update