improved upgrade system, version bump

This commit is contained in:
fatalerrors
2026-03-05 11:25:05 +01:00
parent e1c2705fdd
commit 128cfe8c87
4 changed files with 12 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ check_updates()
# Quiet mode is mostly used internally when profile_upgrade is called
quiet=1
fi
disp I "Checking for updates..."
[[ -n $quiet ]] && disp I "Checking for updates..."
local vfile="/tmp/version"
wget "$UPDT_URL/version" -O $vfile >/dev/null 2>&1 || {
disp E "Can't download version file, impossible to proceed!"
@@ -61,7 +61,7 @@ check_updates()
[[ $quiet ]] && disp I "You should upgrade to last version when possible."
result=1
else
disp I "Your version is up-to-date."
[[ -n $quiet ]] && disp I "Your version is up-to-date."
result=0
fi
rm -f $vfile
@@ -77,12 +77,10 @@ check_updates()
# ------------------------------------------------------------------------------
profile_upgrade()
{
check_updates -q
local need_update=$?
[[ $need_update -ne 1 ]] && {
if check_updates -q; then
disp "No update available."
return 0
}
fi
if [[ -s $MYPATH/profile.sh ]]; then
disp E "Installation path detection failed, cannot upgrade automatically."