# echo "preferences file sets lyxpipe as ${LYXPIPE}"
test -z "${LYXPIPE}" && {
- ABS_SYSTEM_LYXDIR='/Applications/LyX.app/Contents/Resources'
+ ABS_SYSTEM_LYXDIR=$(dirname "$0")
+ ABS_SYSTEM_LYXDIR=$(dirname "${ABS_SYSTEM_LYXDIR}")"/Resources"
test -d "${ABS_SYSTEM_LYXDIR}" || {
echo "Failed to find ABS_SYSTEM_LYXDIR: ${ABS_SYSTEM_LYXDIR}" >&2
exit 1
MAC_LYXPIPE_CONTENTS="LYXCMD:macdvix:server-goto-file-row:$file $2"
# echo "$MAC_LYXPIPE_CONTENTS"
echo "$MAC_LYXPIPE_CONTENTS" > "${LYXPIPE}".in || { echo "Cannot write to lyxpipe." ; exit 2 ; }
- while read line < "${LYXPIPE}".out ; do
+ while read line ; do
echo LyX said: $line
- done || { echo "Cannot read from lyxpipe." ; exit 2 ; }
+ done < "${LYXPIPE}".out || { echo "Cannot read from lyxpipe." ; exit 2 ; }
else
echo "Our best guess sets lyxpipe as ${LYXPIPE}"
echo "But the lyxpipe could not be found."