Follow 302 redirects with curl
I noticed that, after running this script, the jar file was only 144 bytes. Running the commented-out `wget` command worked for me, so I re-ran the `curl` command with `-v`. I noticed that the first response was a 302 redirect. It seemed that `curl` needs an extra nudge to follow redirects. Looking in the man page I found `-L`, which worked for me.
This commit is contained in:
parent
159e107f58
commit
52e1448ba5
@ -58,7 +58,7 @@ fi
|
||||
if [[ "$FORCE" == true ]] || [[ "$response" =~ ^([yY])$ ]]; then
|
||||
echo "Downloading most recent publisher to $jarlocationname - it's ~100 MB, so this may take a bit"
|
||||
# wget "https://fhir.github.io/latest-ig-publisher/org.hl7.fhir.publisher.jar" -O "$jarlocation"
|
||||
curl $dlurl -o "$jarlocation" --create-dirs
|
||||
curl -L $dlurl -o "$jarlocation" --create-dirs
|
||||
else
|
||||
echo cancel...
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user