#!/bin/zsh

# NOTE: This should be called like:
#   $ open -a "Terminal" path/to/UtsusemiPython

#_DIR_="$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)"
_DIR_=$(cd $(dirname $0); pwd)
source "${_DIR_}/_loadenv"

echo "   "
echo " ------------------------------------------------------"
echo "|        ATTENTION "
echo " ------------------------------------------------------"
echo "| If ERROR/core dump occurs on doing Utsusemi commands,"
echo "| run a command as below to reset Utsusemi environment."
echo "| Or add this to the end of ~/.zshrc ."
echo "| "
echo "| $ source "${_DIR_}"/_loadenv"
echo " ------------------------------------------------------"

if [ $? -eq 0 ]; then
    #Trick the terminal into staying open after python ends
    cd ${UTSUSEMI_USR_DIR};/bin/zsh 
else
    echo ;
fi
