Clever link to latest Hugo version download?

There was an extra apostrpohe breaking the command I gave above. Also, it wasn’t able to handle the minor versions, like the latest 0.47.1.

So here is a new command with both of these issues fixed:

wget https://github.com`wget -qO- https://github.com/gohugoio/hugo/releases/latest | grep -oE -m 1 '\/gohugoio\/hugo\/releases\/download\/v[0-9]+.[0-9]+.[0-9]*\/hugo_[0-9]+.[0-9]+.[0-9]*_Linux-64bit.deb'`

If you want the latest extended Sass/SCSS version use this one instead:

wget https://github.com`wget -qO- https://github.com/gohugoio/hugo/releases/latest | grep -oE -m 1 '\/gohugoio\/hugo\/releases\/download\/v[0-9]+.[0-9]+.[0-9]*\/hugo_extended_[0-9]+.[0-9]+.[0-9]*_Linux-64bit.deb'`