However, there is now a much simpler alternative in the form of distro-info. If you've never used this awesome tool written by Benjamin Drung you've been missing out! It can tell you all sorts of interesting information. A few examples...
Examples of how to use distro-info
- What is the current development release on the system I am running on?
$ distro-info --devel saucy
- What is the current Debian development release?
$ debian-distro-info --devel sid
- What are the currently supported Ubuntu releases?
$ ubuntu-distro-info --supported lucid precise quantal raring saucy
- What's the latest Ubuntu LTS release?
$ ubuntu-distro-info --lts precise
- What's the current stable Debian release?
$ debian-distro-info --stable wheezy
distro-info... Now with Added Milestone GoodnessI've been working with Benjamin recently to add a new feature which landed late last week in both Debian unstable and Ubuntu Saucy. So, we can now ask distro-info when a particular release milestone will happen (or has already happened):
- How many days until Ubuntu Saucy is released?
$ ubuntu-distro-info --devel --days 73
- How many days since the Ubuntu Saucy release was "created"?
$ ubuntu-distro-info --devel --days=created -102
- How many days until Ubuntu Precise goes "end-of-life" (desktop only!)
$ ubuntu-distro-info --lts --days=eol 1360
- How many days since Debian sid was created?
$ debian-distro-info --devel --days=created -7294
A Scripted ExampleWe can now write simple little scripts like this to show a popup when getting close to a release:
#!/bin/sh set -- $(distro-info --devel --codename --days=release) codename="$1" days="$2" # Only warn close to a release [ "$days" -gt 30 ] && exit 0 zenity --info --text "$codename is released in $days days!"
Wait! Let's do that with Upstart!In fact, you could turn the script above into an Upstart session job rather easily:
cat >>$HOME/.config/upstart/release-reminder.conf<<EOT start on desktop-start task script set -- $(distro-info --devel --codename --days=release) codename="$1" days="$2" # Only warn close to a release [ "$days" -gt 30 ] && exit 0 zenity --info --text "$codename is released in $days days!" end script EOTNow, this script will run automatically every time you login, assuming you are running either:
- an Ubuntu Raring system with Upstart User sessions enabled.
- Ubuntu Saucy where Upstart User sessions are enabled by default.
We could conceivably enhance this feature further by adding in support for querying additional milestones such as "alpha-1" and "feature-freeze".
Want to know more?
For full details, read distro-info(1).