#!/bin/bash

env_path=$0
type=`stat -c%f $0`

# If we are called from a link get the path where flumotion is
if test $type == 'a1ff'
then
    env_path=`readlink $0`
fi

build_dir=`cd $(dirname $env_path) && pwd`
src_dir=`cd $build_dir && cd @top_srcdir@ && pwd`

export PYTHONPATH=$src_dir${PYTHONPATH:+:$PYTHONPATH}
export PKG_CONFIG_PATH=$src_dir/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}

export PATH=$build_dir/bin:$PATH
export PACKAGES="@PACKAGE@-@VERSION@ $PACKAGES"

exec "$@"
