#!/bin/sh # (C) 2015 Jens Elkner. # License: CDDL 1.0 # Let xdvi find its X11 app-defaults within the TeX Live tree. typeset -r FPROG=${.sh.file} typeset -r PROG=${FPROG##*/} SDIR=${FPROG%/*} XDVI=${ kpsewhich -progname=xdvi --format='other text files' XDvi 2>/dev/null; } if [[ -n ${XDVI} ]]; then X="${XDVI%/*}" X="${X}/%l_%t/%N:${X}/%N" [[ -n ${XFILESEARCHPATH} ]] && \ XFILESEARCHPATH+=":$X" || export XFILESEARCHPATH="$X" fi [[ -x ${SDIR}/xdvi-xaw ]] && XDVI=${SDIR}/xdvi-xaw || XDVI=xdvi-xaw exec ${XDVI} -name ${PROG} "$@"