From 52e7bbb0b3b8f894ef1c5e295ba3d2e77ca78751 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Thu, 3 Jul 2025 10:57:51 +0200 Subject: [PATCH] vikunja: add: unstable selector --- ct/vikunja.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ct/vikunja.sh b/ct/vikunja.sh index 1e50e674..e8979d12 100644 --- a/ct/vikunja.sh +++ b/ct/vikunja.sh @@ -27,12 +27,21 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - RELEASE=$(curl -fsSL https://dl.vikunja.io/vikunja/ | grep -oP 'href="/vikunja/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1) + + if whiptail --backtitle "Vikunja Update" --title "🔄 VERSION SELECTION" --yesno \ + "Choose the version type to update to:\n\n• STABLE: Recommended for production use\n• UNSTABLE: Latest development version\n\n⚠️ WARNING: Unstable versions may contain bugs,\nbe incomplete, or cause system instability.\nOnly use for testing purposes.\n\nDo you want to use the UNSTABLE version?\n(No = Stable, Yes = Unstable)" 16 70 --defaultno + then + RELEASE="unstable" + msg_info "Selected UNSTABLE version" + else + RELEASE=$(curl -fsSL https://dl.vikunja.io/vikunja/ | grep -oP 'href="/vikunja/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1) + msg_info "Selected STABLE version: ${RELEASE}" + fi + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Stopping ${APP}" systemctl stop vikunja msg_ok "Stopped ${APP}" - msg_info "Updating ${APP} to ${RELEASE}" cd /opt rm -rf /opt/vikunja/vikunja @@ -41,11 +50,9 @@ function update_script() { $STD dpkg -i vikunja-$RELEASE-amd64.deb echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" - msg_info "Starting ${APP}" systemctl start vikunja msg_ok "Started ${APP}" - msg_info "Cleaning Up" rm -rf /opt/vikunja-$RELEASE-amd64.deb msg_ok "Cleaned"