From 5761a5200a7dd7d18fd21185c316e03b00cb60a9 Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 10 Apr 2026 12:28:53 -0600 Subject: [PATCH] removie configuation questions openhamclock --- compile.conf | 2 +- install-compiled.sh | 24 ++++++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/compile.conf b/compile.conf index 7caf303..7cf33c2 100644 --- a/compile.conf +++ b/compile.conf @@ -9,7 +9,7 @@ steps=cd src| make| make hamclock-1600x960| mv hamclock-1600x960 $HOME/.local/bi version=26.1.3 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 +steps=npm ci| cp .env.example .env [direwolf] version=1.8.1 diff --git a/install-compiled.sh b/install-compiled.sh index 9abaca6..8c8658e 100755 --- a/install-compiled.sh +++ b/install-compiled.sh @@ -261,12 +261,20 @@ process_app() { process_conf() { local app="" git_url="" wget_url="" install_path="" steps="" version="" desktop="" gui="" + # Collect all app configs into parallel arrays first, so stdin is + # free for interactive prompts when process_app runs afterwards + local -a all_apps all_git all_wget all_install all_steps all_versions all_desktops all_guis + local idx=0 + while IFS= read -r line || [ -n "$line" ]; do [[ -z "$line" || "$line" == \#* ]] && continue if [[ "$line" =~ ^\[(.+)\]$ ]]; then if [ -n "$app" ]; then - process_app "$app" "$git_url" "$wget_url" "$install_path" "$steps" "$version" "$desktop" "$gui" + all_apps[$idx]="$app"; all_git[$idx]="$git_url"; all_wget[$idx]="$wget_url" + all_install[$idx]="$install_path"; all_steps[$idx]="$steps" + all_versions[$idx]="$version"; all_desktops[$idx]="$desktop"; all_guis[$idx]="$gui" + ((idx++)) fi app="${BASH_REMATCH[1]}" git_url="" wget_url="" install_path="" steps="" version="" desktop="" gui="" @@ -276,7 +284,6 @@ process_conf() { local key="${line%%=*}" local raw_value="${line#*=}" - # Steps are stored raw so quotes and variables expand correctly at eval time if [ "$key" = "steps" ]; then steps="$raw_value" continue @@ -296,10 +303,19 @@ process_conf() { done < "$CONF_FILE" - # Process the last app in the file + # Store the last app if [ -n "$app" ]; then - process_app "$app" "$git_url" "$wget_url" "$install_path" "$steps" "$version" "$desktop" "$gui" + all_apps[$idx]="$app"; all_git[$idx]="$git_url"; all_wget[$idx]="$wget_url" + all_install[$idx]="$install_path"; all_steps[$idx]="$steps" + all_versions[$idx]="$version"; all_desktops[$idx]="$desktop"; all_guis[$idx]="$gui" + ((idx++)) fi + + # Now process each app — stdin is the terminal, so read -rp works + for ((i=0; i