improved upgrade system, version bump
This commit is contained in:
@@ -7,6 +7,11 @@ Current version from Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
Version history:
|
Version history:
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
# 05/03/2026 v3.6.0
|
||||||
|
Improved utaz to make it multiformat with lot of it
|
||||||
|
Introduced ppu and ppn
|
||||||
|
Improved update system
|
||||||
|
|
||||||
# 04/03/2026 v3.5.0
|
# 04/03/2026 v3.5.0
|
||||||
rain has now configurable speed and color
|
rain has now configurable speed and color
|
||||||
showinfo adapted to fastfetch, replacing neofetch
|
showinfo adapted to fastfetch, replacing neofetch
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ check_updates()
|
|||||||
# Quiet mode is mostly used internally when profile_upgrade is called
|
# Quiet mode is mostly used internally when profile_upgrade is called
|
||||||
quiet=1
|
quiet=1
|
||||||
fi
|
fi
|
||||||
disp I "Checking for updates..."
|
[[ -n $quiet ]] && disp I "Checking for updates..."
|
||||||
local vfile="/tmp/version"
|
local vfile="/tmp/version"
|
||||||
wget "$UPDT_URL/version" -O $vfile >/dev/null 2>&1 || {
|
wget "$UPDT_URL/version" -O $vfile >/dev/null 2>&1 || {
|
||||||
disp E "Can't download version file, impossible to proceed!"
|
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."
|
[[ $quiet ]] && disp I "You should upgrade to last version when possible."
|
||||||
result=1
|
result=1
|
||||||
else
|
else
|
||||||
disp I "Your version is up-to-date."
|
[[ -n $quiet ]] && disp I "Your version is up-to-date."
|
||||||
result=0
|
result=0
|
||||||
fi
|
fi
|
||||||
rm -f $vfile
|
rm -f $vfile
|
||||||
@@ -77,12 +77,10 @@ check_updates()
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
profile_upgrade()
|
profile_upgrade()
|
||||||
{
|
{
|
||||||
check_updates -q
|
if check_updates -q; then
|
||||||
local need_update=$?
|
|
||||||
[[ $need_update -ne 1 ]] && {
|
|
||||||
disp "No update available."
|
disp "No update available."
|
||||||
return 0
|
return 0
|
||||||
}
|
fi
|
||||||
|
|
||||||
if [[ -s $MYPATH/profile.sh ]]; then
|
if [[ -s $MYPATH/profile.sh ]]; then
|
||||||
disp E "Installation path detection failed, cannot upgrade automatically."
|
disp E "Installation path detection failed, cannot upgrade automatically."
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ done
|
|||||||
# Interactive shell detection, two methods available each one of those might have different result
|
# Interactive shell detection, two methods available each one of those might have different result
|
||||||
# depending on distribution
|
# depending on distribution
|
||||||
#shopt -q login_shell && INTERACTIVE=1
|
#shopt -q login_shell && INTERACTIVE=1
|
||||||
[[ $- == *i* ]] && INTERACTIVE=1
|
[[ $- == *i* ]] && export INTERACTIVE=1
|
||||||
|
|
||||||
if [[ $INTERACTIVE ]]; then
|
if [[ $INTERACTIVE ]]; then
|
||||||
# For compiling (as we often compile with LFS/0linux...)
|
# For compiling (as we often compile with LFS/0linux...)
|
||||||
@@ -184,6 +184,7 @@ if [[ $INTERACTIVE ]]; then
|
|||||||
# Set default language
|
# Set default language
|
||||||
setfr
|
setfr
|
||||||
showinfo
|
showinfo
|
||||||
|
check_updates -q
|
||||||
disp I "Profile version $PROFVERSION chargé..."
|
disp I "Profile version $PROFVERSION chargé..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user