You are not logged in.

#1 2017-09-04 08:30:09

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

getBlender

For Blender 2.79 (defaults to ~/apps/blender)
getBlender script that should get/unpack latest 'stable' blender into ~/apps/blender and rename/backup the old one. Assumes a lot, so a bit fragile on the long run. On the short run it should save you some 'clicky clicky / upack with strange names' situations.

For Blender 2.80 (defaults to ~/apps/blender28)
getBlender28

Required:

sudo apt install lynx wget gawk

Last edited by brontosaurusrex (2018-04-23 17:54:37)

Offline

#2 2017-09-04 10:25:10

Steve
Member
Registered: 2017-01-03
Posts: 642

Re: getBlender

Thanks bront, working for me. Cool script  smile

Last edited by Steve (2017-09-04 10:27:00)

Offline

#3 2017-09-05 14:26:16

shot-in-the-head
Member
Registered: 2015-10-28
Posts: 61

Re: getBlender

Thanks for this, just made use of it smile
Nice idea!

Offline

#4 2017-09-05 15:30:08

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: getBlender

How about...

url="$(lynx -listonly -nonumbers -dump https://builder.blender.org/download/ | grep "$(uname -m).tar" | head -1)"

Only 2 pipes, and you don't need the "bits" variable.

Cool script BTW. Now to check if the version is newer than the one you already have installed.....


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#5 2017-09-05 15:45:34

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

Re: getBlender

damo wrote:

Now to check if the version is newer than the one you already have installed.....

Yeah, any ideas how?  Or the easiest way? Or is it even worth bothering? I mean if one runs this once a month or it's run when there is a tweet about new version is kinda a no-brainer.

Last edited by brontosaurusrex (2017-09-05 16:21:55)

Offline

#6 2017-09-05 16:25:44

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: getBlender

url="$(lynx -listonly -nonumbers -dump https://builder.blender.org/download/ | grep "$(uname -m).tar"| head -1)"

# test for versions
# hash1=latest from blender.org
hash1=$(echo "$url" | awk -F "-" '{print $3}') && echo "blender.org: $hash1"
# hash2= installed version
buildhash2=$(echo "$(./apps/blender/blender -v)" | grep hash)
hash2=${buildhash2##* }  && echo "Installed: $hash2"

if [[ "$hash1" == "$hash2" ]];then 
    echo "Versions are the same. No updates today!"
    exit 0
else
      ....carry on with the rest
fi

Last edited by damo (2017-09-05 16:30:03)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#7 2017-09-05 16:43:04

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

Re: getBlender

@damo: ^ nice, stolen/implemented.

damo wrote:

How about...

url="$(lynx -listonly -nonumbers -dump https://builder.blender.org/download/ | grep "$(uname -m).tar" | head -1)"

implemented. (I have left the '$bits' there, since I'd like to know visually that it is certainly getting the correct version).

Last edited by brontosaurusrex (2017-09-05 17:16:17)

Offline

#8 2018-04-23 16:27:47

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

Re: getBlender

Added a clone for 2.80 version.

Last edited by brontosaurusrex (2018-04-23 16:36:38)

Offline

Board footer

Powered by FluxBB