#!/bin/sh

program_path="$0"

bindirname=`dirname $program_path`
basedirname=$(cd "$bindirname/..";pwd)

libdir=$(basename /usr/local/lib)

export LD_LIBRARY_PATH="$basedirname/$libdir/mysql-workbench:$LD_LIBRARY_PATH"

export MWB_DATA_DIR="$basedirname/share/mysql-workbench"
export MWB_LIBRARY_DIR="$basedirname/share/mysql-workbench/libraries"
export MWB_MODULE_DIR="$basedirname/$libdir/mysql-workbench/modules"
export MWB_PLUGIN_DIR="$basedirname/$libdir/mysql-workbench/plugins"

export DBC_DRIVER_PATH="$basedirname/$libdir/mysql-workbench"

$bindirname/mysql-workbench-bin $*
