Skip to content

Commit 95d23c6

Browse files
Merge pull request #383 from Martinski4GitHub/dev
Code Improvements for Downloads
2 parents e4f8028 + c9b5b16 commit 95d23c6

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

MerlinAU.sh

Lines changed: 9 additions & 9 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-Jan-01
7+
# Last Modified: 2025-Jan-06
88
###################################################################
99
set -u
1010

1111
## Set version for each Production Release ##
12-
readonly SCRIPT_VERSION=1.3.9
12+
readonly SCRIPT_VERSION=1.3.10
1313
readonly SCRIPT_NAME="MerlinAU"
1414
## Set to "master" for Production Releases ##
1515
SCRIPT_BRANCH="dev"
@@ -1521,9 +1521,9 @@ _CheckForNewGUIVersionUpdate_()
15211521
return "$retCode"
15221522
}
15231523

1524-
##-------------------------------------##
1525-
## Added by Martinski W. [2025-Jan-01] ##
1526-
##-------------------------------------##
1524+
##----------------------------------------##
1525+
## Modified by Martinski W. [2025-Jan-06] ##
1526+
##----------------------------------------##
15271527
_CurlFileDownload_()
15281528
{
15291529
if [ $# -lt 2 ] || [ -z "$1" ] || [ -z "$2" ]
@@ -1532,7 +1532,7 @@ _CurlFileDownload_()
15321532

15331533
curl -LSs --retry 4 --retry-delay 5 --retry-connrefused \
15341534
"$1" -o "$tempFilePathDL"
1535-
if [ $? -ne 0 ] && [ ! -s "$tempFilePathDL" ] || \
1535+
if [ $? -ne 0 ] || [ ! -s "$tempFilePathDL" ] || \
15361536
grep -iq "^404: Not Found" "$tempFilePathDL"
15371537
then rm -f "$tempFilePathDL" ; retCode=1
15381538
else mv -f "$tempFilePathDL" "$2" ; retCode=0
@@ -1541,7 +1541,7 @@ _CurlFileDownload_()
15411541
}
15421542

15431543
##----------------------------------------##
1544-
## Modified by Martinski W. [2025-Jan-01] ##
1544+
## Modified by Martinski W. [2025-Jan-06] ##
15451545
##----------------------------------------##
15461546
_SCRIPTUPDATE_()
15471547
{
@@ -1582,7 +1582,7 @@ _SCRIPTUPDATE_()
15821582
[ -s "$SCRIPTVERPATH" ] && urlScriptVers="$(cat "$SCRIPTVERPATH")"
15831583
if [ $# -gt 1 ] && [ "$2" = "newgui" ] && \
15841584
_CheckForNewGUIVersionUpdate_ "$theScriptVers" "$urlScriptVers"
1585-
then extraParam="forceupdate" ; fi
1585+
then extraParam="install" ; fi
15861586
_ReleaseLock_
15871587
exec "$ScriptFilePath" $extraParam
15881588
exit 0
@@ -1630,7 +1630,7 @@ _SCRIPTUPDATE_()
16301630
printf "\n$(date) - $SCRIPT_NAME - Successfully downloaded $SCRIPT_NAME v${DLRepoVersion}\n"
16311631
printf "${CYANct}Update successful! Restarting script...${NOct}\n"
16321632
sleep 1
1633-
_CheckForNewGUIVersionUpdate_ && extraParam="forceupdate"
1633+
_CheckForNewGUIVersionUpdate_ && extraParam="install"
16341634
_ReleaseLock_
16351635
exec "$ScriptFilePath" $extraParam
16361636
exit 0

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.3.9
3-
## 2025-Jan-02
2+
## v1.3.10
3+
## 2025-Jan-06
44

55
![image](https://github.com/user-attachments/assets/185f9fe4-acdb-419a-8154-ab6fa6e0fd46)
66
![image](https://github.com/user-attachments/assets/8f22818d-2118-4c47-a54a-e54fb147fd6b)

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.9
1+
1.3.10

0 commit comments

Comments
 (0)