Download the latest version of sourceforge

advertisements

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

wget -q https://sourceforge.net/projects/graphicsmagick/files/latest/download?source=files -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 - ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/GraphicsMagick-LATEST.tar.gz | tar -xzvf -