Files
coredesktop/coreupdate
2026-05-12 09:28:57 -06:00

78 lines
2.4 KiB
Bash
Executable File

#!/bin/bash
# Print the logo
print_logo() {
cat << "EOF"
██
█ ██
██ ██████ █████ ██ █████ █████ ████ ██ █████ ██
██ ██ ██ ███ ███████ ██ ██ ██ ██ ██ ████████ ██ ██ ███████
█████ ██████ ██ ██ ██████ ██ ████████ ██ █ ███████ ██ ██
██ ██████ ███████ ██████ ██ ██████ ██████ ██████ ███████
EOF
}
# Clear screen and show logo
clear
print_logo
echo "Updating CoreDesktop..."
git -C ~/.local/share/coredesktop pull
sudo cp ~/.local/share/coredesktop/coreupdate ~/.local/bin/coreupdate
sudo cp ~/.local/share/coredesktop/corerefresh ~/.local/bin/corerefresh
echo "Updating Arch..."
sudo pacman -Syu
echo "Updating AUR..."
if ! yay -Sua 2>/dev/null; then
echo "yay -Sua returned an error. Let's rebuild YAY."
sudo pacman -R yay
cd /tmp
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..
rm -rf yay
cd
yay -Sua --noconfirm
else
yay -Sua --noconfirm
fi
echo "Updating Flatpaks..."
flatpak update
echo "Updating Ruby and Rails..."
mise upgrade --bump ruby
mise reshim
gem update
cd ~/.local/share/coredesktop
source utils.sh
source packages.conf
echo "Checking for new packages..."
install_packages "${SYSTEM_UTILS[@]}"
install_packages "${DEV_TOOLS[@]}"
install_packages "${MAINTENANCE[@]}"
install_packages "${DESKTOP[@]}"
install_packages "${MEDIA[@]}"
install_packages "${FONTS[@]}"
echo "Checking for new flatpaks..."
. install-flatpaks.sh
echo "Configuring Bitwarden SSH agent..."
. bitwarden.sh
echo "Update pipx applications..."
pipx upgrade-all
echo "Done."