#!/bin/bash
# Wrapper to display console error messages on Unixes
PREFIX=`dirname $0`
PREFIX=`dirname $PREFIX`
PREFIX=`dirname $PREFIX`
PREFIX=`dirname $PREFIX`
export MCXTRACE=$PREFIX/share/mcxtrace/resources
export PATH=$PREFIX/bin:$PATH
UNAME=`uname -s`


ERRMSG=`echo $* | sed s/\ /\\ /g`
ERRMSG="mcxtrace: $ERRMSG"
if [[ ${UNAME} == Darwin* ]]; then
    osascript -e "tell app \"System Events\" to display dialog \"${ERRMSG}\""
else
    notify-send "${ERRMSG}"
fi


