Files
HamPack/install.sh
2026-03-24 10:42:39 -06:00

97 lines
2.7 KiB
Bash
Executable File

#!/bin/bash -i
#
# Purpose : HamPack installer
# Print the logo
print_logo() {
cat << "EOF"
██╗ ██╗ █████╗ ███╗ ███╗██████╗ █████╗ ██████╗██╗ ██╗
██║ ██║██╔══██╗████╗ ████║██╔══██╗██╔══██╗██╔════╝██║ ██╔╝
███████║███████║██╔████╔██║██████╔╝███████║██║ █████╔╝
██╔══██║██╔══██║██║╚██╔╝██║██╔═══╝ ██╔══██║██║ ██╔═██╗
██║ ██║██║ ██║██║ ╚═╝ ██║██║ ██║ ██║╚██████╗██║ ██╗
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
EOF
}
# --- Main ---
set -e
clear
print_logo
cd ~
sudo -v
echo "Getting the latest version of HamPack..."
rm -rf ~/.local/share/HamPack
git clone https://gitea.young.computer/david/HamPack.git ~/.local/share/HamPack > /dev/null
sudo cp ~/.local/share/HamPack/hampackrefresh ~/.local/bin/hampackrefresh
sudo cp ~/.local/share/HamPack/hampackupdate ~/.local/bin/hampackupdate
cd ~/.local/share/HamPack
# Source utility functions
source utils.sh
# Source package list
if [ ! -f "packages.conf" ]; then
echo "Error: packages.conf not found!"
exit 1
fi
source packages.conf
# echo "Updating system..."
# sudo pacman -Syu --noconfirm
cd ~/
# Install yay AUR helper if not present
#if ! command -v yay &> /dev/null; then
# echo "Installing yay AUR helper..."
# sudo pacman -S --needed git base-devel --noconfirm
# if [[ -d "yay" ]]; then
# echo "yay directory already exists, removing it..."
# rm -rf yay
# fi
# echo "Cloning yay repository..."
# git clone https://aur.archlinux.org/yay.git
# cd yay
# echo "Building yay..."
# makepkg -si --noconfirm
# cd ..
# rm -rf yay
#else
# echo "yay is already installed."
#fi
echo "Installing system utilities..."
install_packages "${UTILITIES[@]}"
echo "Installing applications..."
install_packages "${APPLICATIONS[@]}"
cd ~/.local/share/HamPack
echo "Installing Flatpak applications..."
. install-flatpaks.sh
echo "Installing stand-alone compiled applications..."
. install-compiled.sh
echo "Installing Windows-only applications..."
. install-windows-apps.sh
echo "Installing not1mm..."
curl -LsSf uvx.sh/not1mm/install.sh | sh
echo "Ham Pack is installed. You may want to restart existing applications when convenient."