#!/bin/sh
#
# Little script to set up the environment before launching ams
#
# Copyright (C) 2005 Free Ekanayaka <free@agnula.org>
#
# This script is licensed under the GNU GPL v2 - you can find a
# complete copy of the license under /usr/share/common-licenses/GPL-2

LADSPA_DEFAULT_PATH=/usr/lib/ladspa:/usr/local/ladspa
OPTIONS=" --presetdir /usr/share/ams"

if [ -z "$LADSPA_PATH" ]; then
	export LADSPA_PATH=${LADSPA_DEFAULT_PATH}
fi
if [ $(ps -C jackd| wc -l) -gt 1 ]; then
	OPTIONS="$OPTIONS --jack"
fi

exec /usr/lib/ams/ams.real $OPTIONS $@
