mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
b37d6c9e94
The command line utility of Maxima is inside the Maxima.app bundle and isn't named "maxima"
14 lines
517 B
Bash
Executable File
14 lines
517 B
Bash
Executable File
#!/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
|