Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/Create-NewReleases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
git push origin ${{ steps.nextver.outputs.tag }}

- name: Create Release with Automated Release Notes
uses: softprops/action-gh-release@v2.2.1
uses: softprops/action-gh-release@v2.2.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.nextver.outputs.tag }}
Expand Down
67 changes: 51 additions & 16 deletions MerlinAU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
#
# Original Creation Date: 2023-Oct-01 by @ExtremeFiretop.
# Official Co-Author: @Martinski W. - Date: 2023-Nov-01
# Last Modified: 2025-Apr-12
# Last Modified: 2025-Apr-14
###################################################################
set -u

## Set version for each Production Release ##
readonly SCRIPT_VERSION=1.4.2
readonly SCRIPT_VERSION=1.4.3
readonly SCRIPT_NAME="MerlinAU"
## Set to "master" for Production Releases ##
SCRIPT_BRANCH="master"
SCRIPT_BRANCH="dev"

##----------------------------------------##
## Modified by Martinski W. [2024-Jul-03] ##
Expand Down Expand Up @@ -2830,7 +2830,7 @@ _DownloadScriptFiles_()
}

##------------------------------------------##
## Modified by ExtremeFiretop [2025-Apr-08] ##
## Modified by ExtremeFiretop [2025-Apr-14] ##
##------------------------------------------##
_SCRIPT_UPDATE_()
{
Expand All @@ -2853,10 +2853,20 @@ _SCRIPT_UPDATE_()
_SetVersionSharedSettings_ local "$DLRepoVersion"
_SetVersionSharedSettings_ server "$DLRepoVersion"
fi
if ! "$isInteractive"
then
_SendEMailNotification_ SUCCESS_SCRIPT_UPDATE_STATUS
fi
sleep 1
_ReleaseLock_
exec "$ScriptFilePath" $extraParam
exit 0
else
if ! "$isInteractive"
then
_SendEMailNotification_ FAILED_SCRIPT_UPDATE_STATUS
fi
return 1
fi
return 0
fi
Expand Down Expand Up @@ -2899,7 +2909,7 @@ _SCRIPT_UPDATE_()
else
printf "\n\n${GRNct}Exiting Script Update Utility...${NOct}\n"
sleep 1
return
return 0
fi
elif [ "$scriptUpdateNotify" != "0" ]
then
Expand All @@ -2926,19 +2936,19 @@ _SCRIPT_UPDATE_()
exit 0
else
_WaitForEnterKey_
return
return 1
fi
else
printf "\n\n${GRNct}Exiting Script Update Utility...${NOct}\n"
sleep 1
return
return 0
fi
fi
}

##----------------------------------------##
## Modified by Martinski W. [2025-Mar-24] ##
##----------------------------------------##
##------------------------------------------##
## Modified by ExtremeFiretop [2025-Apr-14] ##
##------------------------------------------##
_CheckForNewScriptUpdates_()
{
local verStr DLScriptVerPath="${SCRIPT_VERPATH}.DL.tmp"
Expand Down Expand Up @@ -2986,7 +2996,6 @@ _CheckForNewScriptUpdates_()
then
scriptUpdateNotify="New script update available.
${REDct}v${SCRIPT_VERSION}${NOct} --> ${GRNct}v${DLRepoVersion}${NOct}"

if [ $# -gt 0 ] && [ "$1" = "-quietcheck" ]
then return 0
fi
Expand Down Expand Up @@ -3022,9 +3031,9 @@ _GetLatestFWUpdateVersionFromRouter_()
echo "$newVersionStr" ; return "$retCode"
}

##------------------------------------------##
## Modified by ExtremeFiretop [2024-Dec-28] ##
##------------------------------------------##
##----------------------------------------##
## Modified by Martinski W. [2024-Apr-14] ##
##----------------------------------------##
_CreateEMailContent_()
{
if [ $# -eq 0 ] || [ -z "$1" ] ; then return 1 ; fi
Expand All @@ -3034,10 +3043,15 @@ _CreateEMailContent_()

rm -f "$tempEMailContent" "$tempEMailBodyMsg"

local subjectStrTag="F/W Update Status"
if echo "$1" | grep -q '._SCRIPT_UPDATE_.'
then subjectStrTag="Script Update Status"
fi
if [ -s "$tempNodeEMailList" ]
then subjectStr="F/W Update Status for $node_lan_hostname"
else subjectStr="F/W Update Status for $MODEL_ID"
then subjectStr="$subjectStrTag for $node_lan_hostname"
else subjectStr="$subjectStrTag for $MODEL_ID"
fi

fwInstalledVersion="$(_GetCurrentFWInstalledLongVersion_)"
if ! "$offlineUpdateTrigger"
then
Expand Down Expand Up @@ -3097,6 +3111,27 @@ _CreateEMailContent_()
printf "\nThe F/W version that is currently installed:\n<b>${fwInstalledVersion}</b>\n"
} > "$tempEMailBodyMsg"
;;
SUCCESS_SCRIPT_UPDATE_STATUS)
if [ -s "$SCRIPT_VERPATH" ]
then
if verStr="$(_GetDLScriptVersion_ "$SCRIPT_VERPATH")"
then
NEW_SCRIPT_VERSION="$(echo "$verStr" | awk -F '|' '{print $1}')"
fi
fi
emailBodyTitle="MerlinAU Script Update Installed"
{
echo "The new MerlinAU Script Update version <b>${DLRepoVersion}</b> has been successfully installed on your <b>${MODEL_ID}</b> router."
printf "\nThe currently installed script version is: <b>${NEW_SCRIPT_VERSION}</b>\n"
} > "$tempEMailBodyMsg"
;;
FAILED_SCRIPT_UPDATE_STATUS)
emailBodyTitle="MerlinAU Script Update Failed"
{
echo "Failed to install the new MerlinAU Script Update version <b>${DLRepoVersion}</b> on your <b>${MODEL_ID}</b> router."
printf "\nThe installed script version remains: <b>${SCRIPT_VERSION}</b>\n"
} > "$tempEMailBodyMsg"
;;
STOP_FW_UPDATE_APPROVAL)
emailBodyTitle="WARNING"
if "$isEMailFormatHTML"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MerlinAU - AsusWRT-Merlin Firmware Auto Updater
## v1.4.2
## 2025-Apr-13
## v1.4.3
## 2025-Apr-26

## WebUI:
![image](https://github.com/user-attachments/assets/a2197262-ca35-451a-8645-311896e1495e)
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.2
1.4.3