Skip to content

Commit 8008a00

Browse files
Merge pull request #505 from ExtremeFiretop/Gnuton-Tweak
Fix Reported Gnuton Comparison Errors
2 parents 90e3380 + 0db4a85 commit 8008a00

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

MerlinAU.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#
55
# Original Creation Date: 2023-Oct-01 by @ExtremeFiretop.
66
# Official Co-Author: @Martinski W. - Date: 2023-Nov-01
7-
# Last Modified: 2025-Aug-02
7+
# Last Modified: 2025-Aug-05
88
###################################################################
99
set -u
1010

1111
## Set version for each Production Release ##
12-
readonly SCRIPT_VERSION=1.5.1
12+
readonly SCRIPT_VERSION=1.5.2
1313
readonly SCRIPT_NAME="MerlinAU"
1414
## Set to "master" for Production Releases ##
1515
SCRIPT_BRANCH="dev"
@@ -839,9 +839,13 @@ _FWVersionStrToNum_()
839839
verStr="$(echo "$verStr" | cut -d'.' -f2-)"
840840
fi
841841
#-----------------------------------------------------------
842-
# NEW: capture any trailing build-suffix digits (e.g. "gnuton2" → 2)
842+
# FIX: capture trailing build-suffix digits ONLY if there is
843+
# a non-digit-and-non-dot char before them (e.g. "-gnuton2").
844+
# Plain "388.9.2" should NOT set buildDigits.
843845
#-----------------------------------------------------------
844-
buildDigits="$(echo "$verStr" | sed -n 's/.*[^0-9]\([0-9]\+\)$/\1/p')"
846+
if printf '%s' "$verStr" | grep -q '[^0-9.]'; then
847+
buildDigits="$(printf '%s' "$verStr" | sed -n 's/^[0-9.]*[^0-9.]\+\([0-9]\+\)$/\1/p')"
848+
fi
845849
buildDigits=$(printf "%02d" "${buildDigits:-0}")
846850

847851
# Production/Beta/Alpha weight digit

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MerlinAU - AsusWRT-Merlin Firmware Auto Updater
2-
## v1.5.1
3-
## 2025-Aug-04
2+
## v1.5.2
3+
## 2025-Aug-05
44

55
## WebUI:
66
![image](https://github.com/user-attachments/assets/9c1dff99-9c13-491b-a7fa-aff924d5f02e)

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.1
1+
1.5.2

0 commit comments

Comments
 (0)