Files
HamPack/hampackupdate
2026-05-20 09:04:13 -06:00

50 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
# Print the logo
print_logo() {
cat << "EOF"
██╗ ██╗ █████╗ ███╗ ███╗██████╗ █████╗ ██████╗██╗ ██╗
██║ ██║██╔══██╗████╗ ████║██╔══██╗██╔══██╗██╔════╝██║ ██╔╝
███████║███████║██╔████╔██║██████╔╝███████║██║ █████╔╝
██╔══██║██╔══██║██║╚██╔╝██║██╔═══╝ ██╔══██║██║ ██╔═██╗
██║ ██║██║ ██║██║ ╚═╝ ██║██║ ██║ ██║╚██████╗██║ ██╗
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
EOF
}
# Clear screen and show logo
clear
print_logo
echo "Updating Arch..."
sudo pacman -Syu
HAMPACK_DIR="$HOME/.local/share/HamPack"
echo "Pulling latest HamPack configuration..."
git -C "$HAMPACK_DIR" pull
echo "Running HamPack installer..."
bash "$HAMPACK_DIR/install.sh"
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