mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-06-14 12:27:02 +00:00
update beta 1.2.2.2
This commit is contained in:
18
menu
18
menu
@@ -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...')"
|
||||
|
||||
Reference in New Issue
Block a user