TARBALL=$2 DIRECTORY="workspace/${TARBALL%.tar.xz}" BINARY=$DIRECTORY/blender SCRIPTS=$(pwd)/setup HOST=$3 echo $TARBALL - $DIRECTORY - $BINARY - $SCRIPTS - $HOST # Create directory for writing mkdir -p workspace/ # Ensure blender workspace does not exist rm -rf workspace/$DIRECTORY/ # Download blender from URL and write it to workspacem and extract the tarball wget https://download.blender.org/release/$1/$TARBALL -O workspace/$TARBALL echo "Extracting $TARBALL..." tar -xf workspace/$TARBALL -C workspace/ # Export binary location export blender=workspace/$BINARY echo | whereis blender # Download the extension from Flamenco and install it wget $HOST/flamenco-addon.zip -O workspace/flamenco-addon.zip blender --command extension install-file -r user_default -e workspace/flamenco-addon.zip # Finally, perform setup scripts blender -b -P $SCRIPTS/setup.py