21 lines
638 B
Bash
21 lines
638 B
Bash
|
TARBALL=$2
|
||
|
DIRECTORY="workspace/${TARBALL%.tar.xz}"
|
||
|
BINARY=$DIRECTORY/blender
|
||
|
SCRIPTS=$(pwd)/setup
|
||
|
echo $TARBALL - $DIRECTORY - $BINARY - $SCRIPTS
|
||
|
|
||
|
# 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 "--- Please add the following location to your PATH:"
|
||
|
echo | whereis blender
|