version 1.1, 2018/04/21 21:11:45
|
version 1.2, 2018/04/21 21:13:27
|
Line 1
|
Line 1
|
#!/bin/bash |
#!/bin/bash |
|
# Borrowed to gnuplot |
|
# record prior dir |
|
STARTDIR=`pwd` |
|
|
read -d '' EXECUTE <<DACODE |
# get the full path to the bundle's MacOS directory |
cd $(dirname "$0")/../Resources/bin |
# and define BINDIR |
pwd |
CWD=$(cd "$(dirname "$0")"; pwd) |
./imach |
TOP="`dirname \"$CWD\"`/Resources" |
DACODE |
BINDIR="${TOP}/bin" |
osascript -e "tell application \"Terminal\" to do script \"$EXECUTE\"" |
|
|
# 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 "$@" |