mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-24 18:43:37 +00:00
0faf6ff22b
The wrapper script is placed in the binary directory of the LyX bundle.
It tries to find the real inkscape command line converter in the
Inkscape.app bundle and starts it or reports an error.
The configure.py is changed for Mac OS to check the presence of
the real inkscape binary in the Inkscape.app bundle.
(cherry picked from commit 350ef993e5
)
16 lines
636 B
Bash
Executable File
16 lines
636 B
Bash
Executable File
#!/bin/bash
|
|
unset DISPLAY
|
|
# at first try the well known location
|
|
RESDIR="/Applications/Inkscape.app/Contents/Resources"
|
|
test -f "${RESDIR}"/bin/inkscape -a -x "${RESDIR}"/bin/inkscape && exec "${RESDIR}"/bin/inkscape --without-gui "$@"
|
|
# this failed... so try PATH expansion to start the inkscape shell wrapper
|
|
IFS=":" read -ra DIRLIST <<< "${PATH}"
|
|
for BINDIR in "${DIRLIST[@]}" ; do
|
|
RESDIR=$(dirname "${BINDIR}")
|
|
test -f "${RESDIR}"/bin/inkscape -a -x "${RESDIR}"/bin/inkscape && exec "${RESDIR}"/bin/inkscape --without-gui "$@"
|
|
done
|
|
# report error and exit with failure status
|
|
exec 1>&2
|
|
echo Could not find Inkscape binary.
|
|
exit 1
|