further improvements

This commit is contained in:
David Young
2026-04-09 14:42:39 -06:00
parent bde8ad0c9b
commit 037344eb94
3 changed files with 22 additions and 16 deletions

View File

@@ -5,6 +5,12 @@ install=$HOME/.local/bin/hamclock
gui=true gui=true
steps=cd src, make, make hamclock-1600x960, mv hamclock-1600X960 $HOME/.local/bin/hamclock steps=cd src, make, make hamclock-1600x960, mv hamclock-1600X960 $HOME/.local/bin/hamclock
[openhamclock]
version=
git=https://github.com/accius/openhamclock.git
install=$HOME/.local/bin/openhamclock
steps=npm ci, cp .env.example .env, read -rp "What is your call sign? " CALLSIGN, sed -i "s/CALLSIGN=NOCALL/CALLSIGN=$CALLSIGN/" .env, read -rp "What is the host IP address or domain name? " HOST, sed -i "s/HOST=localhost/HOST=$HOST/" .env, read -rp "What is your locator code? " LOCATOR, sed -i "s/LOCATOR=FN31/LOCATOR=$LOCATOR/" .env
[direwolf] [direwolf]
version=1.8.1 version=1.8.1
git=https://github.com/wb2osz/direwolf.git git=https://github.com/wb2osz/direwolf.git

View File

@@ -205,7 +205,7 @@ run_steps() {
echo " Building $app..." echo " Building $app..."
IFS=',' read -ra step_list <<< "$steps" IFS=',' read -ra step_list <<< "$steps"
for step in "${step_list[@]}"; do for step in "${step_list[@]}"; do
step=$(echo "$step" | xargs) step=$(echo "$step" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
echo " Running: $step" echo " Running: $step"
eval "$step" eval "$step"
done done
@@ -272,14 +272,21 @@ process_conf() {
fi fi
local key="${line%%=*}" local key="${line%%=*}"
local value="${line#*=}" local raw_value="${line#*=}"
value=$(eval echo "$value")
# Steps are stored raw so quotes and variables expand correctly at eval time
if [ "$key" = "steps" ]; then
steps="$raw_value"
continue
fi
local value
value=$(eval echo "$raw_value")
case "$key" in case "$key" in
git) git_url="$value" ;; git) git_url="$value" ;;
wget) wget_url="$value" ;; wget) wget_url="$value" ;;
install) install_path="$value" ;; install) install_path="$value" ;;
steps) steps="$value" ;;
version) version="$value" ;; version) version="$value" ;;
desktop) desktop="$value" ;; desktop) desktop="$value" ;;
gui) gui="$value" ;; gui) gui="$value" ;;

View File

@@ -28,6 +28,11 @@ print_logo
cd ~ cd ~
sudo -v sudo -v
# Keep sudo session alive for the duration of the script
( while true; do sudo -v; sleep 60; done ) &
SUDO_KEEPALIVE_PID=$!
trap "kill $SUDO_KEEPALIVE_PID" EXIT
if ! command -v git &> /dev/null; then if ! command -v git &> /dev/null; then
echo "Installing git..." echo "Installing git..."
sudo pacman -S --noconfirm git sudo pacman -S --noconfirm git
@@ -89,18 +94,6 @@ install_packages "${SERVERS[@]}"
cd ~/.local/share/HamPackServer cd ~/.local/share/HamPackServer
if [ ! -d "$HOME/.nvm" ]; then
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
else
echo "nvm is already installed, skipping."
fi
if ! command -v node &> /dev/null; then
nvm install --lts
else
echo "Node.js is already installed, skipping."
fi
if ! pacman -Qi apache &> /dev/null; then if ! pacman -Qi apache &> /dev/null; then
echo "Installing Apache..." echo "Installing Apache..."
sudo pacman -S --noconfirm apache sudo pacman -S --noconfirm apache