Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions MerlinAU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Original Creation Date: 2023-Oct-01 by @ExtremeFiretop.
# Official Co-Author: @Martinski W. - Date: 2023-Nov-01
# Last Modified: 2025-Apr-07
# Last Modified: 2025-Apr-08
###################################################################
set -u

Expand Down Expand Up @@ -2806,9 +2806,9 @@ _DownloadScriptFiles_()
return "$retCode"
}

##----------------------------------------##
## Modified by Martinski W. [2025-Mar-24] ##
##----------------------------------------##
##------------------------------------------##
## Modified by ExtremeFiretop [2025-Apr-08] ##
##------------------------------------------##
_SCRIPT_UPDATE_()
{
local extraParam=""
Expand Down Expand Up @@ -2850,7 +2850,7 @@ _SCRIPT_UPDATE_()
if "$mountWebGUI_OK"
then _SetVersionSharedSettings_ server "$DLRepoVersion" ; fi

if [ "$SCRIPT_VERSION" = "$DLRepoVersion" ]
if [ "$SCRIPT_VERSION" = "$DLRepoVersion" ] && { [ -z "$DLRepoBuildNum" ] || [ "$DLRepoBuildNum" = "$ScriptBuildNum" ]; }
then
echo -e "${CYANct}You are on the latest version! Would you like to download anyways?${NOct}"
echo -e "${CYANct}This will overwrite your currently installed version.${NOct}"
Expand All @@ -2865,16 +2865,23 @@ _SCRIPT_UPDATE_()
fi
printf "\n${CYANct}Download successful!${NOct}\n"
printf "$(date) - Successfully downloaded $SCRIPT_NAME v${DLRepoVersion}\n"
printf "${CYANct}Update successful! Restarting script...${NOct}\n"
sleep 1
_CheckForNewGUIVersionUpdate_ && extraParam="install"
_ReleaseLock_
exec "$ScriptFilePath" $extraParam
exit 0
fi
_WaitForEnterKey_
return
else
printf "\n\n${GRNct}Exiting Script Update Utility...${NOct}\n"
sleep 1
return
fi
elif [ "$scriptUpdateNotify" != "0" ]
then
if [ -n "$DLRepoBuildNum" ] && [ "$DLRepoBuildNum" -gt "$ScriptBuildNum" ]
then echo -e "${CYANct}Developer update with timestamp $DLRepoBuildNum available!${NOct}"
fi
echo -e "${CYANct}Bingo! New version available! Would you like to update now?${NOct}"
if _WaitForYESorNO_
then
Expand All @@ -2885,6 +2892,7 @@ _SCRIPT_UPDATE_()
if "$mountWebGUI_OK"
then _SetVersionSharedSettings_ local "$DLRepoVersion"
fi
printf "\n${CYANct}Download successful!${NOct}\n"
printf "\n$(date) - Successfully downloaded $SCRIPT_NAME v${DLRepoVersion}\n"
printf "${CYANct}Update successful! Restarting script...${NOct}\n"
sleep 1
Expand Down