Skip to content

Update MerlinAutoUpdate.sh#11

Merged
ExtremeFiretop merged 1 commit intoExtremeFiretop:mainfrom
Martinski4GitHub:main
Oct 12, 2023
Merged

Update MerlinAutoUpdate.sh#11
ExtremeFiretop merged 1 commit intoExtremeFiretop:mainfrom
Martinski4GitHub:main

Conversation

@Martinski4GitHub
Copy link
Collaborator

Added/modified code to set & later check the number of days to postpone a firmware upgrade once a new update version is found. Other code improvements.

Added/modified code to set & later check the number of days to postpone a firmware upgrade once a new update version is found. Other code improvements.
@ExtremeFiretop ExtremeFiretop merged commit 88def61 into ExtremeFiretop:main Oct 12, 2023
@ExtremeFiretop
Copy link
Owner

HOLY COW!

Thanks Martin, I may as well start calling you a co-owner with the size of the contributions!

This was literally going to be the next thing I worked on (delayed firmware release cycle) and this is fantastic work, better than I could do lol.

I spent a good chunk of the morning reviewing the nice additions and changes lol!

@ExtremeFiretop
Copy link
Owner

@Martinski4GitHub Any thoughts on this?

https://www.snbforums.com/threads/seeking-feedback-contributions-merlin-auto-update-solutions.87044/post-869521

I actually like the CLI for setup for the credentials, for the schedule of the delay cycle, and for the rog file or pure build, but he does have a valid point I think on the method of detection and scraping sourceforge

@ExtremeFiretop
Copy link
Owner

It would probably cut out alot of the code, especially my originals logic for getting the version for SF

@ExtremeFiretop
Copy link
Owner

/usr/sbin/webs_update.sh
readonly UPDATE_AVAILABLE=$(nvram get webs_state_flag)
readonly VERSION_INFO=$(nvram get webs_state_info)

And then in the run, basically:

# If an update is available, construct the URL for the update
if [ "$UPDATE_AVAILABLE" -eq 1 ]; then

	Modified_version=$(echo "$VERSION_INFO" | sed 's/\([0-9]*_[0-9]*\)_\([0-9]*\)_\([0-9]*\)/\1.\2_\3/')
	
	firmware_url="https://sourceforge.net/projects/asuswrt-merlin/files/${MODEL}/Release/${MODEL}_${Modified_version}.zip/download/"

@Martinski4GitHub
Copy link
Collaborator Author

HOLY COW!

Thanks Martin, I may as well start calling you a co-owner with the size of the contributions!

This was literally going to be the next thing I worked on (delayed firmware release cycle) and this is fantastic work, better than I could do lol.

I spent a good chunk of the morning reviewing the nice additions and changes lol!

I hope I'm not "stepping on your toes" by getting ahead and writing a feature that you were planning to do. As long as you're OK, I can continue to help & contribute whenever I can.

@Martinski4GitHub
Copy link
Collaborator Author

@Martinski4GitHub Any thoughts on this?

https://www.snbforums.com/threads/seeking-feedback-contributions-merlin-auto-update-solutions.87044/post-869521

I actually like the CLI for setup for the credentials, for the schedule of the delay cycle, and for the rog file or pure build, but he does have a valid point I think on the method of detection and scraping sourceforge

Yeah, I also think @dave14305 has valid points WRT using the built-in mechanism to get the latest F/W update version and check against the current version before going to the website to retrieve the actual ZIP file. See the latest changes/additions in the most recent PR #12. This would be the starting point, IMO.

@Martinski4GitHub
Copy link
Collaborator Author

/usr/sbin/webs_update.sh readonly UPDATE_AVAILABLE=$(nvram get webs_state_flag) readonly VERSION_INFO=$(nvram get webs_state_info)

And then in the run, basically:

# If an update is available, construct the URL for the update
if [ "$UPDATE_AVAILABLE" -eq 1 ]; then

	Modified_version=$(echo "$VERSION_INFO" | sed 's/\([0-9]*_[0-9]*\)_\([0-9]*\)_\([0-9]*\)/\1.\2_\3/')
	
	firmware_url="https://sourceforge.net/projects/asuswrt-merlin/files/${MODEL}/Release/${MODEL}_${Modified_version}.zip/download/"

Yeah, that sounds like a good idea. I think you can continue to build on top of what I have provided. Check it out. Hopefully, we're on the same page and going in the same direction.

@ExtremeFiretop
Copy link
Owner

ExtremeFiretop commented Oct 13, 2023

I hope I'm not "stepping on your toes" by getting ahead and writing a feature that you were planning to do.

ABSOLUTELY NOT!

I think we are actually going into the same direction, your just much faster at this than I am hahaha! Please by all means feel free to continue :) Else it may take me twice as long to get something functional!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants