Find OpenWrt current version quickly

Is there a way to check in a script to see if I need to update Openwrt? I would like to run a script weekly to see if there is a newer version available.

For Clamav I find the current version like this.

dig +short txt | awk -F'[":]' '{print $2}'

I compare that to the results from this command to see if I need an update.

clamscan -V | awk -F'[ /]' '{print $2}'

On openwrt the file /etc/os-release tells me what I am running. Is there a standard URL to check to most recent stable release? All the URLs on the home page to get the current release contain the value of the current release, which I am trying to find out. I really hate having to parse html to find out something.

You can subscribe with Email/RSS or fetch and parse JSON:

1 Like

Perhaps get the list of tags from github?

curl | jq -r '.[] | .name'

It feels like there should be a better way...

1 Like

Could the openwrt project publish a DNS TXT record, like clamav does, with the current release(s) in it. I guess their are now two "stable" releases and sometimes there is a development release. You could put multiple releases in the TXT record in some established order and I could pick one. Or you could publish multiple TXT records for stable, development, snapshot or whatever. DNS is super flexible.

My automated build scripts use this shell code to parse the download webpage at and get the latest release version.

wget -qO- | grep releases | awk -F'/' '{print $2}' | tr '\n' ' ' | awk '{print $1}'

At the moment it is returning

because that is the current stable release


Thanks. That works nicely. I should have been able to figure that out, but I didn't.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.