]> git.lyx.org Git - lyx.git/blobdiff - lib/scripts/TeXFiles.sh
*lib/scripts/layout2layout.py: Fix section labelling
[lyx.git] / lib / scripts / TeXFiles.sh
index 0572e3c3e1fbda19cc0cf3d42e24ce8a4ea70f2b..e832255d70f0aba4df9faf95d655a29040ce6aa2 100755 (executable)
@@ -1,13 +1,23 @@
 #!/bin/sh
-# file: ~/bin/TeXFiles.sh
+
+# file TeXFiles.sh
+# This file is part of LyX, the document processor.
+# Licence details can be found in the file COPYING.
+
+# author Herbert Voß
+# author Jean-Marc Lasgouttes
+# author Jürgen Spitzmüller
+
+# Full author contact details are available in file CREDITS.
+
 # all files            -> without option
-# TeX class files      -> option cls 
+# TeX class files      -> option cls
 # TeX style files      -> option sty
 # bibtex style files   -> option bst
 # bibtex database files -> option bib
 #
 # with the help
-# of kpsewhich and creates a 
+# of kpsewhich and creates a
 # bstFiles.lst, clsFiles.lst, styFiles.lst, bibFiles.lst
 # without any parameter all files are created.
 #
@@ -23,7 +33,7 @@ BST_STYLEFILE=bstFiles.lst
 BIB_FILES=bibFiles.lst
 version='$Id: TeXFiles.sh,v 0.3 2003-02-14'
 progname=`echo $0 | sed 's%.*/%%'`
-usage="Usage: TeXFiles.sh [-version | cls | sty | bst | bib ] 
+usage="Usage: TeXFiles.sh [-version | cls | sty | bst | bib ]
        Default is without any Parameters,
        so that all files will be created"
 
@@ -56,7 +66,7 @@ fi
 
 for type in $types ; do
   echo "Indexing files of type $type"
-  case $type in 
+  case $type in
    cls) outfile=$CLS_STYLEFILE
         kpsetype=.tex;;
    sty) outfile=$STY_STYLEFILE
@@ -72,7 +82,7 @@ for type in $types ; do
   rm -f $outfile
   touch $outfile
 
-  dirs=`kpsewhich --show-path=$kpsetype 2>/dev/null | tr "$SEP" " " | sed -e 's%///%/%' -e 's%//%/%g' -e 's%!!%%g'`
+  dirs=`kpsewhich --show-path=$kpsetype 2>/dev/null | tr "$SEP" " " | sed -e 's%/\{2,\}%/%g' -e 's%!!%%g'`
 
   for dir in $dirs ; do
     find $dir -follow -name "*.$type" >>$outfile 2>/dev/null