Sophie

Sophie

distrib > Mandriva > 2008.0 > x86_64 > by-pkgid > 8c1a96618c5f76e0d4006fa5d8b85d82 > files > 27

blender-2.45-2.1mdv2008.0.src.rpm

#!/bin/sh
#
# A wrapper script for Blender
#

# In case user's home directory doesn't contain ~/.blender, copy it
# from ${BLENDER_LIBDIR}/blender

export BLENDER_LIBDIR=SPECDEFINED

if [ ! -d ~/.blender ]; then
    install -d ~/.blender
    ln -sf /usr/share/locale ~/.blender
    ln -sf ${BLENDER_LIBDIR}/blender/.Blanguages ~/.blender
    ln -sf ${BLENDER_LIBDIR}/blender/.bfont.ttf ~/.blender
    cp -a ${BLENDER_LIBDIR}/blender/VERSION ~/.blender

    install -d ~/.blender/plugins/sequence
    install -d ~/.blender/plugins/texture
    if [ -d ${BLENDER_LIBDIR}/blender/bpydata ]; then
        cp -a ${BLENDER_LIBDIR}/blender/bpydata ~/.blender
       ln -sf ${BLENDER_LIBDIR}/blender/bpydata/config/* ~/.blender/bpydata/config/
    fi
    install -d ~/.blender/scripts
    ln -sf ${BLENDER_LIBDIR}/blender/scripts/* ~/.blender/scripts/
fi

# 
# In case the user's ~/.blender came from older versions, some files 
# should be reinstalled.
#

if [ $(cat ~/.blender/VERSION) != $(cat ${BLENDER_LIBDIR}/blender/VERSION) ]; then
    if [ -d ${BLENDER_LIBDIR}/blender/bpydata ]; then
        cp -a ${BLENDER_LIBDIR}/blender/bpydata ~/.blender
    fi
    ln -sf ${BLENDER_LIBDIR}/blender/scripts/* ~/.blender/scripts/
    cp -a ${BLENDER_LIBDIR}/blender/VERSION ~/.blender
fi

TEMP=$TMP

if [ "x$TEMP" == x ]; then
    TEMP=$TMPDIR
fi

if [ "x$TEMP" == x ]; then
    TEMP=/tmp/.private/$USER
fi

export TEMP