#!/bin/sh
# This is a wrapper script to point BARNOWL_DATA_DIR at the source dir
# if we're running from a build tree. barnowl.bin is the actual built
# binary.

EXE="$0.bin"

if test ! -x "$EXE"; then
    echo "Cannot find $EXE" >&2
    exit 1
fi

BARNOWL_DATA_DIR="@abs_srcdir@/perl"
BARNOWL_BIN_DIR="@abs_builddir@"
export BARNOWL_DATA_DIR
export BARNOWL_BIN_DIR
exec "$EXE" "$@"
