How to automate checking for Ubuntu 22.4 release

Makar - Apr 21 '22 - - Dev Community

So, Ubuntu 22.04 LTS is due today, but the actual time of release is uncertain. If you are refreshing their site like me to be the first to download it, don't -- automate it instead. Here's my little bash script to alert me automatically as soon as 22 rolls out:

{
  function func_name () {
    FOUND=`curl -s https://ubuntu.com/download/desktop | grep 'Ubuntu 22'`
    echo $FOUND;
    if [ ! -z "$FOUND" ]; then
      spd-say "Ubuntu 22 is out"
    fi
  }

  export -f func_name

  watch -n 5 -x bash -c func_name
}
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . .