#!/bin/bash # Borrowed to gnuplot # record prior dir STARTDIR=`pwd` # get the full path to the bundle's MacOS directory # and define BINDIR CWD=$(cd "$(dirname "$0")"; pwd) TOP="`dirname \"$CWD\"`/Resources" BINDIR="${TOP}/bin" # Strip out the argument added by the OS, if any if /bin/expr "x$1" : '^x-psn_' > /dev/null; then shift 1 fi cd "$STARTDIR" open -a Terminal "$BINDIR"/imach "$@"