#!/bin/bash
#
# Copyright (c) 2013-2014 ADMB Foundation
#
shopt -s expand_aliases

SCRIPT_DIR=$(cd `dirname $0` && pwd)

if [ -f "$SCRIPT_DIR/build/debug/bin/admb" ]; then
  declare -rx ADMB_HOME="$SCRIPT_DIR/build/dist"
  $ADMB_HOME/bin/admb $*
  exit 0
fi

if [ -f "$SCRIPT_DIR/bin/admb" ]; then
  declare -rx ADMB_HOME="$SCRIPT_DIR"
  $ADMB_HOME/bin/admb $*
  exit 0
fi

echo "Error: Unable to find 'admb'."
exit 0
