improved upgrade system, version bump
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user