Am Samstag, 15. April 2006 19:47 schrieb Enrico Forestieri:
> On Sat, Apr 15, 2006 at 06:54:56PM +0200, Georg Baum wrote:
> I can't do that because it doesn't depend on cygwin or windows but
> on miktex or tetex. If you use miktex SEP=';', if you use tetex SEP=':'.
> I am attaching a revised patch taking into account your previous
> counterexample, which now works.

But I still don't like it. The attached patch steals code from mktexlsr 
(on which the original test was appareantly based). No need to reinvent 
the wheel.
If it works for you I am going to commit that.

This does still not support miktex with cygwin, but if you want that you 
should pass an additional argument to TeXFiles.sh which tells what TeX 
engine to use, based on the \cygwin_path_fix_needed configuration switch.

> You are very right, but please admit that a ';' in a filename occurs
> with a lower probability than a space in unix...

Yes. Your test is nevertheless a hack, and because of things like this I 
wanted you to commit your stuff yourself. I am much less picky about 
things others put in, but I am not going to commit anything with what I 
do not agree 100%.


Georg
Index: lib/scripts/TeXFiles.sh
===================================================================
--- lib/scripts/TeXFiles.sh	(Revision 13689)
+++ lib/scripts/TeXFiles.sh	(Arbeitskopie)
@@ -41,15 +41,16 @@ 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, which pretends to be UNIX.
+# Create a variable that holds the right character to be used by the scripts.
+DOSISH=no
+case `uname -s` in
+  CYGWIN*|Cygwin*|cygwin*) ;;
+  *) 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

Reply via email to