44#
55# Original Creation Date: 2023-Oct-01 by @ExtremeFiretop.
66# Official Co-Author: @Martinski W. - Date: 2023-Nov-01
7- # Last Modified: 2025-Jul-03
7+ # Last Modified: 2025-Jul-18
88# ##################################################################
99set -u
1010
1111# # Set version for each Production Release ##
12- readonly SCRIPT_VERSION=1.5.0
12+ readonly SCRIPT_VERSION=1.5.1
1313readonly SCRIPT_NAME=" MerlinAU"
1414# # Set to "master" for Production Releases ##
1515SCRIPT_BRANCH=" dev"
@@ -195,7 +195,7 @@ readonly fwInstalledBranchVer="${fwInstalledBaseVers}.$(echo "$fwInstalledBuildV
195195# For minimum supported firmware version check #
196196MinFirmwareVerCheckFailed=false
197197readonly MinSupportedFW_3004_386_Ver=" 3004.386.13.2"
198- readonly MinSupportedFW_3004_388_Ver=" 3004.388.8.0 "
198+ readonly MinSupportedFW_3004_388_Ver=" 3004.388.8.4 "
199199readonly MinSupportedFW_3006_102_Ver=" 3004.388.8.2"
200200
201201# #----------------------------------------##
@@ -1188,9 +1188,6 @@ _InitCustomDefaultsConfig_()
11881188 fi
11891189 local retCode=0 preferredPath
11901190
1191- # TEMPORARY Migration Function #
1192- _Migrate_Settings_
1193-
11941191 if ! grep -q " ^FW_New_Update_Notification_Date " " $CONFIG_FILE "
11951192 then
11961193 if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 1 ]
@@ -1969,94 +1966,6 @@ _Set_FW_UpdateZIP_DirectoryPath_()
19691966 return 0
19701967}
19711968
1972- # #----------------------------------------##
1973- # # Modified by Martinski W. [2025-Feb-15] ##
1974- # #----------------------------------------##
1975- # # Function to migrate specific settings from old values to new standardized values.
1976- # # This function is meant to be only TEMPORARY.
1977- # # We should be safe to remove it after 3 months, or 5 version releases,
1978- # # whichever comes first. Similar to the migration function removed in v1.0.9
1979- # #-----------------------------------------------------------------------------------##
1980- _Migrate_Settings_ ()
1981- {
1982- [ ! -s " $CONFIG_FILE " ] && return 1
1983-
1984- # # Migrate Setting from [y|Y|n|N] to [ENABLED|DISABLED] ##
1985- ROGBuild_Value=" $( Get_Custom_Setting ROGBuild) "
1986- if [ " $ROGBuild_Value " != " TBD" ]
1987- then
1988- case " $ROGBuild_Value " in
1989- y|Y) New_ROGBuild_Value=" ENABLED" ;;
1990- n|N) New_ROGBuild_Value=" DISABLED" ;;
1991- * )
1992- New_ROGBuild_Value=" "
1993- ! echo " $ROGBuild_Value " | grep -qE " ^(ENABLED|DISABLED)$" && \
1994- Say " ROGBuild has a unknown value: '$ROGBuild_Value '. Skipping migration for this setting."
1995- ;;
1996- esac
1997- if [ -n " $New_ROGBuild_Value " ]
1998- then
1999- if Update_Custom_Settings ROGBuild " $New_ROGBuild_Value "
2000- then
2001- Say " ROGBuild setting was successfully migrated to '$New_ROGBuild_Value '."
2002- else
2003- Say " Error occurred while migrating ROGBuild setting to '$New_ROGBuild_Value '."
2004- fi
2005- fi
2006- fi
2007-
2008- # # Migrate Setting from [y|Y|n|N] to [ENABLED|DISABLED] ##
2009- TUFBuild_Value=" $( Get_Custom_Setting TUFBuild) "
2010- if [ " $TUFBuild_Value " != " TBD" ]
2011- then
2012- case " $TUFBuild_Value " in
2013- y|Y) New_TUFBuild_Value=" ENABLED" ;;
2014- n|N) New_TUFBuild_Value=" DISABLED" ;;
2015- * )
2016- New_TUFBuild_Value=" "
2017- ! echo " $TUFBuild_Value " | grep -qE " ^(ENABLED|DISABLED)$" && \
2018- Say " TUFBuild has a unknown value: '$TUFBuild_Value '. Skipping migration for this setting."
2019- ;;
2020- esac
2021- if [ -n " $New_TUFBuild_Value " ]
2022- then
2023- if Update_Custom_Settings TUFBuild " $New_TUFBuild_Value "
2024- then
2025- Say " TUFBuild setting was successfully migrated to '$New_TUFBuild_Value '."
2026- else
2027- Say " Error occurred while migrating TUFBuild setting to '$New_TUFBuild_Value '."
2028- fi
2029- fi
2030- fi
2031-
2032- # # Migrate Setting from [true|false] to [ENABLED|DISABLED] ##
2033- EMailNotif_Value=" $( grep ' ^FW_New_Update_EMail_Notification=' " $CONFIG_FILE " | cut -d' =' -f2 | tr -d ' "' ) "
2034- if [ -n " $EMailNotif_Value " ] && [ " $EMailNotif_Value " != " TBD" ]
2035- then
2036- case " $EMailNotif_Value " in
2037- true|TRUE|True) New_EMailNotif_Value=" ENABLED" ;;
2038- false|FALSE|False) New_EMailNotif_Value=" DISABLED" ;;
2039- * )
2040- New_EMailNotif_Value=" "
2041- ! echo " $EMailNotif_Value " | grep -qE " ^(ENABLED|DISABLED)$" && \
2042- Say " FW_New_Update_EMail_Notification has a unknown value: '$EMailNotif_Value '. Skipping migration for this setting."
2043- ;;
2044- esac
2045- if [ -n " $New_EMailNotif_Value " ]
2046- then
2047- sed -i ' /^FW_New_Update_EMail_Notification .*/d' " $CONFIG_FILE "
2048- sed -i " s/^FW_New_Update_EMail_Notification=.*/FW_New_Update_EMail_Notification $New_EMailNotif_Value /" " $CONFIG_FILE "
2049- if [ $? -eq 0 ]
2050- then
2051- sendEMailNotificationsFlag=" $New_EMailNotif_Value "
2052- Say " EMail_Notification setting was successfully migrated to $New_EMailNotif_Value ."
2053- else
2054- Say " Error occurred while migrating EMail_Notification setting to $New_EMailNotif_Value ."
2055- fi
2056- fi
2057- fi
2058- }
2059-
20601969# #------------------------------------------##
20611970# # Modified by ExtremeFiretop [2024-Jan-27] ##
20621971# #------------------------------------------##
@@ -2705,30 +2614,6 @@ _UpdateConfigFromWebUISettings_()
27052614 return 0
27062615}
27072616
2708- # #-------------------------------------##
2709- # # Added by Martinski W. [2024-Dec-31] ##
2710- # #-------------------------------------##
2711- newGUIversionNum=" $( _ScriptVersionStrToNum_ ' 1.4.0' ) "
2712- # Temporary code used to migrate to future new script version #
2713- _CheckForNewGUIVersionUpdate_ ()
2714- {
2715- local retCode theScriptVerNum urlScriptVerNum
2716- if [ $# -lt 2 ] || [ -z " $1 " ] || [ -z " $2 " ]
2717- then
2718- theScriptVerNum=" $ScriptVersionNum "
2719- urlScriptVerNum=" $DLRepoVersionNum "
2720- else
2721- theScriptVerNum=" $( _ScriptVersionStrToNum_ " $1 " ) "
2722- urlScriptVerNum=" $( _ScriptVersionStrToNum_ " $2 " ) "
2723- fi
2724- if [ " $theScriptVerNum " -lt " $newGUIversionNum " ] && \
2725- [ " $urlScriptVerNum " -ge " $newGUIversionNum " ]
2726- then retCode=0
2727- else retCode=1
2728- fi
2729- return " $retCode "
2730- }
2731-
27322617# #-------------------------------------##
27332618# # Added by Martinski W. [2025-Mar-24] ##
27342619# #-------------------------------------##
@@ -2830,20 +2715,15 @@ _DownloadScriptFiles_()
28302715 return " $retCode "
28312716}
28322717
2833- # #----------------------------------------##
2834- # # Modified by Martinski W. [2025-May-05 ] ##
2835- # #----------------------------------------##
2718+ # #------------------------------------------- ##
2719+ # # Modified by ExtremeFiretop [2025-July-18 ] ##
2720+ # #------------------------------------------- ##
28362721_SCRIPT_UPDATE_ ()
28372722{
2838- local extraParam=" "
2839-
28402723 if [ $# -gt 0 ] && [ " $1 " = " force" ]
28412724 then
28422725 printf " \n${CYANct} Force downloading latest script version...${NOct} \n"
28432726 _CheckForNewScriptUpdates_ -quietcheck
2844- if _CheckForNewGUIVersionUpdate_ " $SCRIPT_VERSION " " $DLRepoVersion "
2845- then extraParam=" install"
2846- fi
28472727 printf " ${CYANct} Downloading latest version [$DLRepoVersion ] of ${SCRIPT_NAME}${NOct} \n"
28482728
28492729 if _DownloadScriptFiles_ update
@@ -2860,7 +2740,7 @@ _SCRIPT_UPDATE_()
28602740 fi
28612741 sleep 1
28622742 _ReleaseLock_
2863- exec " $ScriptFilePath " $extraParam
2743+ exec " $ScriptFilePath "
28642744 exit 0
28652745 else
28662746 if ! " $isInteractive "
@@ -2901,9 +2781,8 @@ _SCRIPT_UPDATE_()
29012781 printf " $( date) - Successfully updated $SCRIPT_NAME v${DLRepoVersion} \n"
29022782 printf " ${CYANct} Restarting script...${NOct} \n"
29032783 sleep 1
2904- _CheckForNewGUIVersionUpdate_ && extraParam=" install"
29052784 _ReleaseLock_
2906- exec " $ScriptFilePath " $extraParam
2785+ exec " $ScriptFilePath "
29072786 exit 0
29082787 fi
29092788 else
@@ -2930,9 +2809,8 @@ _SCRIPT_UPDATE_()
29302809 printf " \n$( date) - Successfully updated $SCRIPT_NAME v${DLRepoVersion} \n"
29312810 printf " ${CYANct} Restarting script...${NOct} \n"
29322811 sleep 1
2933- _CheckForNewGUIVersionUpdate_ && extraParam=" install"
29342812 _ReleaseLock_
2935- exec " $ScriptFilePath " $extraParam
2813+ exec " $ScriptFilePath "
29362814 exit 0
29372815 else
29382816 _WaitForEnterKey_
0 commit comments