diff --git a/development/MacOSX/Makefile.am b/development/MacOSX/Makefile.am index 579c9287bf..b9cdfa6575 100644 --- a/development/MacOSX/Makefile.am +++ b/development/MacOSX/Makefile.am @@ -8,7 +8,7 @@ bundledir = ${prefix}/Contents dist_bundle_DATA = PkgInfo nodist_bundle_DATA = Info.plist -dist_bin_SCRIPTS = lyxeditor +dist_bin_SCRIPTS = lyxeditor maxima dist_pkgdata_DATA = COPYING LyXapp.icns LyX.icns LyX.sdef dmg-background.png nodist_pkgdata_DATA = lyxrc.dist diff --git a/development/MacOSX/maxima b/development/MacOSX/maxima new file mode 100755 index 0000000000..a36f8f85f9 --- /dev/null +++ b/development/MacOSX/maxima @@ -0,0 +1,13 @@ +#!/bin/bash +# at first try the well known location +DIR="/Applications/Maxima.app/Contents/Resources" +test -f "${DIR}"/maxima.sh -a -x "${DIR}"/maxima.sh && exec "${DIR}"/maxima.sh "$@" +# this failed... so try PATH expansion to start the maxima shell wrapper +IFS=":" read -ra DIRLIST <<< "${PATH}" +for DIR in "${DIRLIST[@]}" ; do + test -f "${DIR}"/maxima.sh -a -x "${DIR}"/maxima.sh && exec "${DIR}"/maxima.sh "$@" +done +# report error and exit with failure status +exec 1>&2 +echo Maxima shell wrapper not found. +exit 1