update beta 1.2.2.2

This commit is contained in:
MacRimi
2026-06-09 00:13:24 +02:00
parent 6844406cf7
commit 61ff665cec
30 changed files with 5510 additions and 396 deletions

18
menu
View File

@@ -135,8 +135,22 @@ check_updates_stable() {
[[ -z "$LOCAL_VERSION" ]] && return 0
[[ "$LOCAL_VERSION" = "$REMOTE_VERSION" ]] && return 0
if whiptail --title "$(translate 'Update Available')" \
--yesno "$(translate 'New version available') ($REMOTE_VERSION)\n\n$(translate 'Do you want to update now?')" \
# Extract the translated prompt strings into variables FIRST so the
# whiptail line below is trivially parseable. A user on the 1.2.2
# update path hit:
# menu: line 138: syntax error near unexpected token `$REMOTE_VERSION'
# The original inline form was technically valid bash, but a
# translate() return that contains a stray quote or paren is enough
# to confuse a partially-rewritten file (race during update) or a
# corrupted download. Splitting the strings out closes the entire
# parsing-risk surface for zero behavioural change.
local PROMPT_TITLE PROMPT_AVAIL PROMPT_ASK
PROMPT_TITLE="$(translate 'Update Available')"
PROMPT_AVAIL="$(translate 'New version available')"
PROMPT_ASK="$(translate 'Do you want to update now?')"
if whiptail --title "$PROMPT_TITLE" \
--yesno "$PROMPT_AVAIL ($REMOTE_VERSION)\n\n$PROMPT_ASK" \
10 60 --defaultno; then
msg_warn "$(translate 'Starting ProxMenux update...')"