Repository URL to install this package:
Version:
2.2.7 ▾
|
#!/bin/bash
#
# Universal launch script for Natron
#
#set -e # Exit immediately if a command exits with a non-zero status
#set -u # Treat unset variables as an error when substituting.
#set -x # Print commands and their arguments as they are executed.
# Get real current dir
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do
SOURCEDIR=`dirname "$SOURCE"`
DIR=`cd -P "$SOURCEDIR" && pwd`
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
SOURCEDIR=`dirname "$SOURCE"`
DIR=`cd -P "$SOURCEDIR" && pwd`
# Force numeric
export LC_NUMERIC=C
# glibc write to stderr
export LIBC_FATAL_STDERR_=1
# KDE4 workaround (QTBUG-30981)
export QT_PLUGIN_PATH=""
# Set fontconfig path
# Not needed (done in app), but added to avoid warn before splashscreen
if [ -d "$DIR/Resources/etc/fonts" ]; then
export FONTCONFIG_PATH="$DIR/Resources/etc/fonts"
fi
BUNDLE_LIBRARY_PATH=${DIR}/lib
for lib in $DIR/Plugins/OFX/Natron/*.ofx.bundle; do
if [ -d "${lib}/Libraries" ]; then
BUNDLE_LIBRARY_PATH="${BUNDLE_LIBRARY_PATH}:${lib}/Libraries"
fi
done
# Check for updates
if [ "${1:-}" = "-update" -a -x "$DIR/NatronSetup" ]; then
"$DIR/NatronSetup" --updater
exit 0
fi
# Portable mode, save settings in current dir
if [ "${1:-}" = "-portable" ]; then
#XDG_CACHE_HOME=/tmp
XDG_DATA_HOME="$DIR"
XDG_CONFIG_HOME="$DIR"
export XDG_DATA_HOME XDG_CONFIG_HOME
fi
# start app, with optional debug
if [ "${1:-}" = "-debug" -a -x "$DIR/bin/NatronRenderer.debug" ]; then
SEGFAULT_SIGNALS="all"
export SEGFAULT_SIGNALS
catchsegv "$DIR/bin/NatronRenderer.debug" "$@"
else
"$DIR/bin/NatronRenderer" "$@"
fi
# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End: