4 ms·
> curl follows redirects, `curl -O` is functionally identical to wget. No it's not :) You need to `curl -LO`. See for example github releases: curl -LO htt
by deepersprout 7y ago
> curl follows redirects, `curl -O` is functionally identical to wget.
No it's not :)
You need to `curl -LO`. See for example github releases:
curl -LO https://github.com/S2-/gitlit/releases/download/v1.4.1/gitlit-1.4.1.tar.gz
downloads the tar.gz, while
curl -O https://github.com/S2-/gitlit/releases/download/v1.4.1/gitlit-1.4.1.tar.gz
will download an html file.
Even better would be to use `curl -LOJ`, so if the filename is not in the url, but in the `Content-Disposition filename` http response header, curl would get the filename from there.
- tyingq 7y agoPretty good overview of why I just use wget for such things.