#!/bin/sh

# Copyright (C) 2020 Tommi Höynälänmaa

# This file is part of Theme-D-Golf.

# You can redistribute and/or modify this file under the terms of the
# GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any
# later version.

# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see https://www.gnu.org/licenses/.


topdir=@src_dir@

export PATH=$topdir/meta:$PATH

if [ "$GUILE_LOAD_PATH" = "" ] ; then
    export GUILE_LOAD_PATH=$topdir/guile-code:$topdir/theme-d-code
else
    export GUILE_LOAD_PATH=$topdir/guile-code:$topdir/theme-d-code:$GUILE_LOAD_PATH
fi

if [ "$THEME_D_LIB_DIR" = "" ] ; then
    export THEME_D_LIB_DIR=$topdir/theme-d-code:
else
    export THEME_D_LIB_DIR=$topdir/theme-d-code:$THEME_D_LIB_DIR
fi

exec "$@"
