0

I was writing a script with wget that tried to download the latest version of blender available on blenders home page to try to automate downloading the latest version. I ran into a problem with wget though. If you continue through the webpage to the download page of your desired version, there seems to be a redirection request (or something like it) that gives you a mirror to the most appropriate download for you location. I tried using curl -L -O to try to follow that redirection, but it didn't seem to do what I wanted it to.

Is there a way to handle this using wget? My current ideal script would navigate from the blender home page every time without any hard links to specific versions.

1 Answer 1

0

I can't recall where I found the original version of this script, which referenced builder.blender.org (that is, nightly builds for 2.80), but fortunately it turns out there's a download subdomain. Try this:

export BLENDER_VERSION=2.80

wget -P /tmp/ -r --no-parent -A 'blender-'$BLENDER_VERSION'-linux-*-x86_64.tar.bz2' https://download.blender.org/release/Blender${BLENDER_VERSION}/ \
    && mkdir -p /blender \
    && tar -xvjf /tmp/download.blender.org/release/Blender${BLENDER_VERSION}/blender-*-x86_64.tar.bz2 --strip 1 -C /blender \
    && ln -sf /blender/blender /usr/bin/blender \
    && rm -rf /tmp/download.blender.org/

This is a direct download, not from one of the mirrors, so will be slow, but at least is automatable.

(Discovered by way of looking at how to download past versions)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .