]> git.lyx.org Git - lyx.git/blobdiff - lib/scripts/lyxpak.py
Pass parameters by reference (performance)
[lyx.git] / lib / scripts / lyxpak.py
index 4d10cb641713b29d184979ef7eab27b13a273b95..ed4f20666d5f52a2911d3fb76fc4cc10ad6fd1f6 100755 (executable)
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 # -*- coding: utf-8 -*-
 
 # file lyxpak.py
@@ -146,6 +145,8 @@ def gather_files(curfile, incfiles, lyx2lyx):
         match = re_options.match(lines[i])
         if match:
             file = match.group(3).strip('"')
+            if file.startswith("bibtotoc,"):
+                file = file[9:]
             if not os.path.isabs(file):
                 file = os.path.join(curdir, file + '.bst')
             if os.path.exists(file):
@@ -174,7 +175,7 @@ def gather_files(curfile, incfiles, lyx2lyx):
     return 0
 
 
-def find_lyx2lyx(progloc):
+def find_lyx2lyx(progloc, path):
     " Find a usable version of the lyx2lyx script. "
     # first we will see if the script is roughly where we are
     # i.e., we will assume we are in $SOMEDIR/scripts and look
@@ -275,7 +276,7 @@ def main(args):
     path = string.split(os.environ["PATH"], os.pathsep)
 
     if lyx2lyx == None:
-        lyx2lyx = find_lyx2lyx(ourprog)
+        lyx2lyx = find_lyx2lyx(ourprog, path)
 
     # Initialize the list with the specified LyX file and recursively
     # gather all required files (also from child documents).