From 128cfe8c87af55c52c7ab8b2cc3d74a44a597a9a Mon Sep 17 00:00:00 2001 From: fatalerrors Date: Thu, 5 Mar 2026 11:25:05 +0100 Subject: [PATCH] improved upgrade system, version bump --- history.txt | 5 +++++ profile.d/updates.sh | 10 ++++------ profile.sh | 3 ++- version | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/history.txt b/history.txt index f1ce573..27e41df 100644 --- a/history.txt +++ b/history.txt @@ -7,6 +7,11 @@ Current version from Geoffray Levasseur ------------------------------------------------------------------------------ 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 rain has now configurable speed and color showinfo adapted to fastfetch, replacing neofetch diff --git a/profile.d/updates.sh b/profile.d/updates.sh index aafb4ff..e33eece 100644 --- a/profile.d/updates.sh +++ b/profile.d/updates.sh @@ -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." diff --git a/profile.sh b/profile.sh index 9e64173..f697a51 100644 --- a/profile.sh +++ b/profile.sh @@ -147,7 +147,7 @@ done # Interactive shell detection, two methods available each one of those might have different result # depending on distribution #shopt -q login_shell && INTERACTIVE=1 -[[ $- == *i* ]] && INTERACTIVE=1 +[[ $- == *i* ]] && export INTERACTIVE=1 if [[ $INTERACTIVE ]]; then # For compiling (as we often compile with LFS/0linux...) @@ -184,6 +184,7 @@ if [[ $INTERACTIVE ]]; then # Set default language setfr showinfo + check_updates -q disp I "Profile version $PROFVERSION chargé..." fi diff --git a/version b/version index 1809198..40c341b 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.4.0 +3.6.0