[tex-live] ifplatform: Detection of TeX Live on Windows

Alexander Cherepanov cherepan at mccme.ru
Tue Aug 25 16:41:22 CEST 2009


Hi Will!
On Tue, 25 Aug 2009 02:15:36 +0930, Will Robertson <wspr81 at gmail.com> wrote:

>>> Well, ifplatform only claims to manage Windows/Unix/MacOS X, and
>>> otherwise gives up with "Unknown"!
>>
>> So Cygwin is Windows, Unix, or Unknown?:-)
> 
> My philosophy thus far (which isn't very far) is that Cygwin is a  
> "Unix" as far as ifplatform is concerned. 

This rules out at least some filesystem checks.

> For the basic reason that I  
> personally only ever use \ifwindows to work out whether I need to use  
> `copy` or `cp`, `del` or `rm`.

I agree with Manuel that it is better to check for the shell instead 
of file system. Checking for # seems good enough. There is a windows 
counterpart -- check for % : `echo %comspec%` will output literal 
"%comspec%" in unix and will output something else in windows.
Looking at output of `echo` (without arguments) is also good.

Or you can just test for working copy/cp as Joseph Wright have 
suggested.

Alexander Cherepanov




More information about the tex-live mailing list