]> git.lyx.org Git - lyx.git/blob - development/MacOSX/inkscape
ctests: invert for new ru example_lyxified.lyx
[lyx.git] / development / MacOSX / inkscape
1 #!/bin/bash
2 unset DISPLAY
3 # at first try the well known location
4 RESDIR="/Applications/Inkscape.app/Contents/Resources"
5 test -f "${RESDIR}"/bin/inkscape -a -x "${RESDIR}"/bin/inkscape && exec "${RESDIR}"/bin/inkscape --without-gui "$@"
6 # this failed... so try PATH expansion to start the inkscape shell wrapper
7 IFS=":" read -ra DIRLIST <<< "${PATH}"
8 for BINDIR in "${DIRLIST[@]}" ; do
9         RESDIR=$(dirname "${BINDIR}")
10         test -f "${RESDIR}"/bin/inkscape -a -x "${RESDIR}"/bin/inkscape && exec "${RESDIR}"/bin/inkscape --without-gui "$@"
11 done
12 # report error and exit with failure status
13 exec 1>&2
14 echo Could not find Inkscape binary.
15 exit 1