Update vikunja.sh

This commit is contained in:
Tobias 2026-01-28 15:40:51 +01:00 committed by GitHub
parent 834e0244a5
commit 3e1a942d27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,21 +28,21 @@ function update_script() {
exit exit
fi fi
RELEASE="$(cat /opt/Vikunja_version 2>/dev/null || true)" RELEASE="$( [[ -f "$HOME/.vikunja" ]] && cat "~/.vikunja" 2>/dev/null || [[ -f /opt/Vikunja_version ]] && cat /opt/Vikunja_version 2>/dev/null)"
if [[ "$RELEASE" == "unstable" ]] || dpkg --compare-versions "$RELEASE" lt "1.0.0"; then if [[ "$RELEASE" == "unstable" ]] || { [[ -n "$RELEASE" ]] && dpkg --compare-versions "$RELEASE" lt "1.0.0"; }; then
msg_warn "You are upgrading from Vikunja '$RELEASE'." msg_warn "You are upgrading from Vikunja '$RELEASE'."
msg_warn "This requires MANUAL config changes in /etc/vikunja/config.yml." msg_warn "This requires MANUAL config changes in /etc/vikunja/config.yml."
msg_warn "See: https://vikunja.io/changelog/whats-new-in-vikunja-1.0.0/#config-changes" msg_warn "See: https://vikunja.io/changelog/whats-new-in-vikunja-1.0.0/#config-changes"
read -rp "Continue with update? (y/yes to proceed): " -t 30 CONFIRM1 || exit 1 read -rp "Continue with update? (y to proceed): " -t 30 CONFIRM1 || exit 1
[[ "$CONFIRM1" =~ ^([yY]|[yY][eE][sS])$ ]] || exit 0 [[ "$CONFIRM1" =~ ^[yY]$ ]] || exit 0
echo echo
msg_warn "Vikunja may not start after the update until you manually adjust the config." msg_warn "Vikunja may not start after the update until you manually adjust the config."
msg_warn "Details: https://vikunja.io/changelog/whats-new-in-vikunja-1.0.0/#config-changes" msg_warn "Details: https://vikunja.io/changelog/whats-new-in-vikunja-1.0.0/#config-changes"
read -rp "Acknowledge and continue? (y/yes): " -t 30 CONFIRM2 || exit 1 read -rp "Acknowledge and continue? (y): " -t 30 CONFIRM2 || exit 1
[[ "$CONFIRM2" =~ ^([yY]|[yY][eE][sS])$ ]] || exit 0 [[ "$CONFIRM2" =~ ^[yY]$ ]] || exit 0
fi fi
if check_for_gh_release "vikunja" "go-vikunja/vikunja" "latest"; then if check_for_gh_release "vikunja" "go-vikunja/vikunja" "latest"; then