From aeda30e1cd2884c85ac9ee98b4ab7fb659ec1044 Mon Sep 17 00:00:00 2001 From: F-Farho <106468683+F-Farho@users.noreply.github.com> Date: Mon, 9 Mar 2026 11:13:38 +0100 Subject: [PATCH 1/2] Update install.sh the current setup fails because the rc is not there, instead of renaming the file, it runs a loop and check if there an rc version..to guarantee a successful setup.. --- docker/install.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docker/install.sh b/docker/install.sh index d8414c4..b77fdf8 100644 --- a/docker/install.sh +++ b/docker/install.sh @@ -26,6 +26,36 @@ echo "" RELEASES=("0.7.0" "0.6.0") LATEST_RELEASE="0.7.0" +# Resolves the actual filename to use for a given base name by checking if the exact file exists on GitHub. If not, it searches for an RC variant +# (e.g. config_0.7.0-rc.1.env) and returns that instead. +resolve_filename() { + local base_url="$1" + local filename="$2" + + # Check if the exact file exists (HTTP 200) + if curl -s -o /dev/null -w "%{http_code}" "${base_url}/${filename}" | grep -q "^200$"; then + echo "${filename}" + return + fi + + # Extract the stem and extension to search for RC variants + # e.g. "config_0.7.0.env" -> stem="config_0.7.0" ext=".env" + local stem="${filename%.*}" + local ext=".${filename##*.}" + + # Try rc.1 through rc.9 + for rc_num in $(seq 1 9); do + local rc_filename="${stem}-rc.${rc_num}${ext}" + if curl -s -o /dev/null -w "%{http_code}" "${base_url}/${rc_filename}" | grep -q "^200$"; then + echo "${rc_filename}" + return + fi + done + + # No variant found, return original and let the download fail naturally + echo "${filename}" +} + # Prompt user to select version echo -e "\033[1;34m Select a version to install:\033[0m" echo -e " \033[1;37m1)\033[0m Latest release (${LATEST_RELEASE}) (recommended)" From 6c2b94e5b2238396d761e74ae21a438ba6716195 Mon Sep 17 00:00:00 2001 From: F-Farho <106468683+F-Farho@users.noreply.github.com> Date: Mon, 9 Mar 2026 11:45:10 +0100 Subject: [PATCH 2/2] Update install.sh --- docker/install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/install.sh b/docker/install.sh index b77fdf8..85dccba 100644 --- a/docker/install.sh +++ b/docker/install.sh @@ -31,15 +31,16 @@ LATEST_RELEASE="0.7.0" resolve_filename() { local base_url="$1" local filename="$2" + local http_code # Check if the exact file exists (HTTP 200) - if curl -s -o /dev/null -w "%{http_code}" "${base_url}/${filename}" | grep -q "^200$"; then + http_code=$(curl -s -o /dev/null -w "%{http_code}" "${base_url}/${filename}") + if [[ "${http_code}" == "200" ]]; then echo "${filename}" return fi # Extract the stem and extension to search for RC variants - # e.g. "config_0.7.0.env" -> stem="config_0.7.0" ext=".env" local stem="${filename%.*}" local ext=".${filename##*.}"