2

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.

1 Answers1

0

Some time ago... But this is the way:

wget -O- https://api.launchpad.net/devel/ubuntu/series | \
  jq '.entries | .[] | select(.status=="Current Stable Release").name'

Supported ones can be queried with jq '.entries | .[] | select(.supported==true).name'

LTS are jq -r '.entries | .[] | select(.version | test("^[0-9]?[02468].04")) | .name'

Treviño
  • 2,604