[tex-live] [pretest] problem generating formats (jadetex, mptopdf)

Reinhard Kotucha reinhard.kotucha at web.de
Mon Apr 28 00:21:53 CEST 2014


On 2014-04-27 at 18:42:27 +0200, Stephan Hennig wrote:

 > Am 27.04.2014 00:26, schrieb Reinhard Kotucha:
 > 
 > > It's easy to find files if you have a local CTAN mirror and if you can
 > > make use of the powerful tools available on every Unix installation:
 > > 
 > >   $ find /mirror/CTAN -name mlnames.sty
 > >   /mirror/CTAN/tex-archive/macros/xmltex/contrib/passivetex/mlnames.sty
 > 
 > Which reminds me:
 > 
 >   C:\>tlmgr check
 >   FIND: Parameterformat falsch
 >   TLTree: find F:/texlive/2014 returned 2, stopping.

tlpkg/TeXLive/TLTree:

  sub init_from_files {
    my $self = shift;
    my $svnroot = $self->{'svnroot'};
    my @lines = `find $svnroot`;

The last line doesn't work on Windows and I'm sure that Norbert used
find(1) accidentally instead of Perl's File::Find module.


 > Window's find command is very different from Unix find and works more
 > grep-like.  A workaround is described at
 > <URL:http://stackoverflow.com/questions/6285148/windows-equivalent-for-unix-find-command-to-search-multiple-file-types>.

Sorry, this link isn't very helpful at all.  Not even the answers are
useless, even the question contains significant bugs.

The invocation of find(1) on Unix is completely wrong.  Wildcards have
to be quoted unconditionally.  Consider

  find . -name *.cpp

Suppose that there is a file foo.cpp in the current directory.  The
shell will expand the command to

  find . -name foo.cpp

and find(1) will search for files called 'foo.cpp' only, not for
'*.cpp'.

What you really want is that find expands wildcards itself.  The
actual behavior depends on the shell.  Bash passes wildcards silently
to the program if they can't be expanded, tcsh complains in this case.
Bash users are often not aware of this problem because they get
reasonable results without quoting in most cases and don't notice
their mistake.  The behavior of tcsh isn't much better.  You still get
wrong results when wildcards can be expanded by the shell. 

Regardless of the shell being used,

   find . -name '*.cpp'

is always appropriate.

As to Windows, I'm not aware of a commandline tool comparable with GNU
find.  The best thing you can do is to search the internet for Windows
binaries of GNU find[utils].

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------



More information about the tex-live mailing list