continue to build
This commit is contained in:
25
hampackrefresh
Executable file
25
hampackrefresh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Print the logo
|
||||
print_logo() {
|
||||
cat << "EOF"
|
||||
|
||||
|
||||
██
|
||||
█ ██
|
||||
██ ██████ █████ ██ █████ █████ ████ ██ █████ ██
|
||||
██ ██ ██ ███ ███████ ██ ██ ██ ██ ██ ████████ ██ ██ ███████
|
||||
█████ ██████ ██ ██ ██████ ██ ████████ ██ █ ███████ ██ ██
|
||||
██ ██████ ███████ ██████ ██ ██████ ██████ ██████ ███████
|
||||
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
# Clear screen and show logo
|
||||
clear
|
||||
print_logo
|
||||
|
||||
echo "Let's get the lastest changes to CoreDesktop..."
|
||||
|
||||
wget -qO- https://gitea.young.computer/david/desktoplinux.arch/raw/branch/main/install.sh | bash
|
||||
46
hampackupdate
Executable file
46
hampackupdate
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Print the logo
|
||||
print_logo() {
|
||||
cat << "EOF"
|
||||
|
||||
|
||||
██╗ ██╗ █████╗ ███╗ ███╗██████╗ █████╗ ██████╗██╗ ██╗
|
||||
██║ ██║██╔══██╗████╗ ████║██╔══██╗██╔══██╗██╔════╝██║ ██╔╝
|
||||
███████║███████║██╔████╔██║██████╔╝███████║██║ █████╔╝
|
||||
██╔══██║██╔══██║██║╚██╔╝██║██╔═══╝ ██╔══██║██║ ██╔═██╗
|
||||
██║ ██║██║ ██║██║ ╚═╝ ██║██║ ██║ ██║╚██████╗██║ ██╗
|
||||
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
|
||||
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
# Clear screen and show logo
|
||||
clear
|
||||
print_logo
|
||||
|
||||
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
|
||||
|
||||
# Will need to update the downloaded binaries and the compiled apps
|
||||
# In the area below...
|
||||
|
||||
echo "Done. You probably want to reboot your system..."
|
||||
13
install-flatpaks.sh
Executable file
13
install-flatpaks.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
FLATPAKS=(
|
||||
"flathub io.sourceforge.wsjt.wsjtx"
|
||||
"flathub com.js8call.JS8Call"
|
||||
)
|
||||
|
||||
for pak in "${FLATPAKS[@]}"; do
|
||||
if ! flatpak list | grep -i "$pak" &> /dev/null; then
|
||||
echo "Installing Flatpak: $pak"
|
||||
flatpak install --noninteractive "$pak"
|
||||
else
|
||||
echo "Flatpak already installed: $pak"
|
||||
fi
|
||||
done
|
||||
136
install.sh
Normal file
136
install.sh
Normal file
@@ -0,0 +1,136 @@
|
||||
#!/bin/bash -i
|
||||
|
||||
# Print the logo
|
||||
print_logo() {
|
||||
cat << "EOF"
|
||||
|
||||
██╗ ██╗ █████╗ ███╗ ███╗██████╗ █████╗ ██████╗██╗ ██╗
|
||||
██║ ██║██╔══██╗████╗ ████║██╔══██╗██╔══██╗██╔════╝██║ ██╔╝
|
||||
███████║███████║██╔████╔██║██████╔╝███████║██║ █████╔╝
|
||||
██╔══██║██╔══██║██║╚██╔╝██║██╔═══╝ ██╔══██║██║ ██╔═██╗
|
||||
██║ ██║██║ ██║██║ ╚═╝ ██║██║ ██║ ██║╚██████╗██║ ██╗
|
||||
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
|
||||
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
# Parse command line arguments
|
||||
DEV_ONLY=false
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
case $1 in
|
||||
--dev-only) DEV_ONLY=true; shift ;;
|
||||
*) echo "Unknown parameter: $1"; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Clear screen and show logo
|
||||
|
||||
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
|
||||
|
||||
SRC="$HOME/.local/share/HamPack/hampackupdate"
|
||||
DST="$HOME/.local/bin/hampackupdate"
|
||||
|
||||
MAX_RETRIES=3
|
||||
retries=0
|
||||
|
||||
while true; do
|
||||
if [ "$SRC" -nt "$DST" ]; then
|
||||
retries=$((retries + 1))
|
||||
if [ "$retries" -ge "$MAX_RETRIES" ]; then
|
||||
echo "Error: failed to sync files after $MAX_RETRIES attempts, exiting."
|
||||
exit 1
|
||||
fi
|
||||
echo "Source is newer than destination, updating (attempt $retries)..."
|
||||
sudo cp -p "$SRC" "$DST"
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "Destination is up to date, proceeding..."
|
||||
break
|
||||
done
|
||||
|
||||
sudo cp ~/.local/share/coredesktop/hampackrefresh ~/.local/bin/hampackrefresh
|
||||
|
||||
# Exit on any error
|
||||
|
||||
set -e
|
||||
|
||||
cd ~/.local/share/HamPack
|
||||
|
||||
# Source the packages list
|
||||
|
||||
if [ ! -f "packages.conf" ]; then
|
||||
echo "Error: packages.conf not found!"
|
||||
fi
|
||||
|
||||
source packages.conf
|
||||
|
||||
# Update the system first
|
||||
|
||||
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 "Cloning yay repository..."
|
||||
else
|
||||
echo "yay directory already exists, removing it..."
|
||||
rm -rf yay
|
||||
fi
|
||||
|
||||
git clone https://aur.archlinux.org/yay.git
|
||||
|
||||
cd yay
|
||||
echo "building yay.... yaaaaayyyyy"
|
||||
makepkg -si --noconfirm
|
||||
cd ..
|
||||
rm -rf yay
|
||||
else
|
||||
echo "yay is already installed"
|
||||
fi
|
||||
|
||||
# Install packages by category
|
||||
|
||||
if [[ "$DEV_ONLY" == true ]]; then
|
||||
# Only install essential development packages
|
||||
echo "Installing system utilities..."
|
||||
install_packages "${SYSTEM_UTILS[@]}"
|
||||
|
||||
echo "Installing development tools..."
|
||||
install_packages "${DEV_TOOLS[@]}"
|
||||
else
|
||||
# Install all packages
|
||||
echo "Installing system utilities..."
|
||||
install_packages "${UTILITIES[@]}"
|
||||
|
||||
echo "Installing development tools..."
|
||||
install_packages "${APPLICATIONS[@]}"
|
||||
|
||||
cd ~/.local/share/HamPack
|
||||
|
||||
# Install Flatpack applications
|
||||
|
||||
echo "Installing Flatpack Applications..."
|
||||
|
||||
. install-flatpacks.sh
|
||||
|
||||
echo "Done."
|
||||
26
packages.conf
Normal file
26
packages.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
# Ham utilities
|
||||
UTILITIES=(
|
||||
fldigi
|
||||
flrig
|
||||
hamlib
|
||||
gpds
|
||||
gpsbabel
|
||||
qgis
|
||||
splat
|
||||
voacapl
|
||||
zim-tools
|
||||
zimwriterfs
|
||||
wine
|
||||
winetricks
|
||||
pat-bin
|
||||
python-yattag # must come before chirp-next
|
||||
chirp-next
|
||||
alsa-utils
|
||||
)
|
||||
|
||||
# Ham applications
|
||||
APPLICATIONS=(
|
||||
gridtracker2
|
||||
chattervox-bin
|
||||
)
|
||||
|
||||
28
utils.sh
Executable file
28
utils.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Function to check if a package is installed
|
||||
is_installed() {
|
||||
pacman -Qi "$1" &> /dev/null
|
||||
}
|
||||
|
||||
# Function to check if a package is installed
|
||||
is_group_installed() {
|
||||
pacman -Qg "$1" &> /dev/null
|
||||
}
|
||||
|
||||
# Function to install packages if not already installed
|
||||
install_packages() {
|
||||
local packages=("$@")
|
||||
local to_install=()
|
||||
|
||||
for pkg in "${packages[@]}"; do
|
||||
if ! is_installed "$pkg" && ! is_group_installed "$pkg"; then
|
||||
to_install+=("$pkg")
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${#to_install[@]} -ne 0 ]; then
|
||||
echo "Installing: ${to_install[*]}"
|
||||
yay -S --noconfirm "${to_install[@]}"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user