44#
55# Original Creation Date: 2023-Oct-01 by @ExtremeFiretop.
66# Official Co-Author: @Martinski W. - Date: 2023-Nov-01
7- # Last Modified: 2024-Oct-04
7+ # Last Modified: 2024-Oct-13
88# ##################################################################
99set -u
1010
1111# # Set version for each Production Release ##
12- readonly SCRIPT_VERSION=1.3.2
12+ readonly SCRIPT_VERSION=1.3.3
1313readonly SCRIPT_NAME=" MerlinAU"
1414# # Set to "master" for Production Releases ##
15- SCRIPT_BRANCH=" master "
15+ SCRIPT_BRANCH=" dev "
1616
1717# #----------------------------------------##
1818# # Modified by Martinski W. [2024-Jul-03] ##
@@ -5268,23 +5268,23 @@ _EntwareServicesHandler_()
52685268 " $isInteractive " && printf " \nDone.\n"
52695269}
52705270
5271- # #----------------------------------------##
5272- # # Modified by Martinski W. [2024-Jul-29 ] ##
5273- # #----------------------------------------##
5271+ # #------------------------------------------ ##
5272+ # # Modified by ExtremeFiretop [2024-Oct-13 ] ##
5273+ # #------------------------------------------ ##
52745274_GetOfflineFirmwareVersion_ ()
52755275{
52765276 local zip_file=" $1 "
52775277 local extract_version_regex=' [0-9]+_[0-9]+\.[0-9]+_[0-9a-zA-Z]+'
5278- local validate_version_regex=' [0-9]+\.[0-9]+\.[0-9]+\.[0-9a-zA-Z]+'
5278+ local validate_version_regex=' [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+(_[0- 9a-zA-Z]+)? '
52795279 local fwVersionFormat
52805280
52815281 # Extract the version number using regex #
52825282 firmware_version=" $( echo " $zip_file " | grep -oE " $extract_version_regex " ) "
52835283
52845284 if [ -n " $firmware_version " ]
52855285 then
5286- # Replace underscores with dots #
5287- formatted_version=" $( echo " $firmware_version " | sed ' s/_/./g ' ) "
5286+ # Replace underscores with dots and insert .0 before the suffix #
5287+ formatted_version=" $( echo " $firmware_version " | sed -E ' s/^([0-9]+)_([0-9]+\.[0-9]+)_([0-9a-zA-Z]+)/\1.\2.0_\3/ ' ) "
52885288 printf " \nIdentified firmware version: ${GRNct} $formatted_version ${NOct} \n"
52895289 printf " \n---------------------------------------------------\n"
52905290 else
@@ -5298,15 +5298,15 @@ _GetOfflineFirmwareVersion_()
52985298 printf " \nFailed to identify firmware version from the ZIP file name."
52995299 fi
53005300 printf " \nPlease enter the firmware version number in the format ${fwVersionFormat} \n"
5301- printf " \n(Examples: 3004.388.8.0 or 3004.388.8.beta1 ): "
5301+ printf " \n(Examples: 3004.388.8.0 or 3004.388.8.0_beta1 ): "
53025302 read -r formatted_version
53035303
53045304 # Validate user input #
53055305 while ! echo " $formatted_version " | grep -qE " ^${validate_version_regex} $"
53065306 do
53075307 printf " \n${REDct} **WARNING**${NOct} Invalid format detected!\n"
53085308 printf " \nPlease enter the firmware version number in the format ${fwVersionFormat} \n"
5309- printf " \n(i.e 3004.388.8.0 or 3004.388.8.beta1 ): "
5309+ printf " \n(i.e 3004.388.8.0 or 3004.388.8.0_beta1 ): "
53105310 read -r formatted_version
53115311 done
53125312 printf " \nThe user-provided firmware version: ${GRNct} $formatted_version ${NOct} \n"
@@ -5590,9 +5590,9 @@ _RunBackupmon_()
55905590 return 0
55915591}
55925592
5593- # #----------------------------------------##
5594- # # Modified by Martinski W. [2024-Jul-31 ] ##
5595- # #----------------------------------------##
5593+ # #------------------------------------------ ##
5594+ # # Modified by ExtremeFiretop [2024-Oct-13 ] ##
5595+ # #------------------------------------------ ##
55965596_RunOfflineUpdateNow_ ()
55975597{
55985598 local retCode
@@ -5631,7 +5631,8 @@ _RunOfflineUpdateNow_()
56315631 printf " \n2. No support will be offered when flashing firmware offline."
56325632 printf " \n3. This offline feature is excluded from documentation on purpose.\n"
56335633 printf " \nDo you acknowledge the risk and wish to proceed?"
5634- printf " \nYou must type '${REDct} YES${NOct} ' to continue.\n"
5634+ printf " \nYou must type '${REDct} YES${NOct} ' to continue."
5635+ printf " \n---------------------------------------------------\n"
56355636
56365637 read -r response
56375638 if [ " $response " = " YES" ]
0 commit comments