On Monday 02 December 2002 6:02 pm, Darren Freeman wrote:
> wherever it lives I need to know the relative path to the LyX it came
> with.. ideally people who are intrepid betatesters could alias lyx to
> the script and it would figure out where lyx

Why not invoke it with either
        $ lyxdbg
or
        $ lyxdbg -x /usr/local/bin/lyx-1.2.2

And probe the command line inside the script. Something like:

EXECUTABLE=lyx
if [ $# -ge 2 -a "$1" = "-x" ]; then
        EXECUTABLE=$2
fi

which ${EXECUTABLE}  > /dev/null ||
{
        echo "Unable to find \"${EXECUTABLE}\"."
        exit 1
}

Angus

Reply via email to