From 5ac63517c698a6b44f2c6b42f470638822811510 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Thu, 20 Apr 2006 16:59:51 +0000 Subject: [PATCH] From Enrico Forestieri: * lib/scripts/TeXFiles.sh: Account for Cygwin teTeX on Windows. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13704 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/scripts/TeXFiles.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/scripts/TeXFiles.sh b/lib/scripts/TeXFiles.sh index e832255d70..300bb16d6b 100755 --- a/lib/scripts/TeXFiles.sh +++ b/lib/scripts/TeXFiles.sh @@ -41,15 +41,20 @@ types=$1 test -z "$types" && types="cls sty bst bib" # -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use ';' to separate -# directories in path lists whereas Unixes uses ':'. -# $SEP holds the right character to be used by the scripts. -# -#??????????????? -# never used this one with windows and what happens with mac?? -#??????????????? -# -if test -z "$COMSPEC" && test -z "$ComSpec"; then SEP=':'; else SEP=';'; fi +# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate +# directories in path lists whereas Unix uses `:'. Make an exception for +# Cygwin, where we could have either teTeX (using `:') or MikTeX (using `;'). +# Create a variable that holds the right character to be used by the scripts. +DOSISH=no +case `uname -s` in + CYGWIN*|Cygwin*|cygwin*) + # MikTeX's kpsewhich says "kpathsea emulation version x.x.x", whereas + # teTeX's simply "kpathsea version x.x.x". + if kpsewhich --version | grep emulation >/dev/null 2>&1; then DOSISH=yes; fi + ;; + *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi +esac +if test "$DOSISH" = "no"; then SEP=':'; else SEP=';'; fi # # A copy of some stuff from mktex.opt, so we can run in the presence of