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 "$@"
12 # report error and exit with failure status
14 echo Could not find Inkscape binary.