I'm using a script to build an unattended install ISO for some servers. A few weeks ago, Ubuntu incremented 14.04.3 to 14.04.4. The script I am using has the version number hard-coded into the script, so it could not find the ISO to download anymore because the name had changed.
Is there a way to programmatically query the most current version of the 14.x or 16.x series so I can know what version number to download? Ideally it would be by requesting a file with wget and reading a string from it.