#!/bin/sh
## ---------------------------------------------------------------------
##
## Copyright (C) 2014 - 2015 by the deal.II authors
##
## This file is part of the deal.II library. It is a modified version
## of the file FEniCS terminal from the FEniCS project.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## ---------------------------------------------------------------------


if [ "$BASH_SOURCE" == "$0" ]
then
  export DEAL_II_BUNDLE=`echo "$0" | sed -e 's|/Contents/MacOS/.*||'`
  export DEAL_II_RESOURCES=$DEAL_II_BUNDLE/Contents/Resources
  open -a /Applications/Utilities/Terminal.app $DEAL_II_RESOURCES/@DEAL_II_EXECUTABLE_RELDIR@/dealii-terminal
else
  export DEAL_II_BUNDLE=`echo "$BASH_SOURCE" | sed -e 's|/Contents/MacOS/.*||'`
  export DEAL_II_RESOURCES=$DEAL_II_BUNDLE/Contents/Resources
  source $DEAL_II_RESOURCES/@DEAL_II_SHARE_RELDIR@/dealii.conf
fi
