Download the latest version of sourceforge


I am trying to download latest version of graphicsmagick from Sourceforge in my bash script

wget -q -O GraphicsMagick-LATEST.tar.gz
tar -xzvf GraphicsMagick-LATEST.tar.gz

The problem is that when I try to extract the tar.gz I get the following error

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

This means that the script is not downloading the latest tar.gz but rather another filetype?

Why is that happening and what I am missing here?

I suggest:

wget -q -O - | tar -xzvf -