mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Get rid of the global lyx2lyx variable.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37558 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
495558b5fd
commit
b26fc9ff62
@ -21,8 +21,6 @@ if sys.version_info < (2, 4, 0):
|
||||
from sets import Set as set
|
||||
from getopt import getopt
|
||||
|
||||
lyx2lyx = None
|
||||
|
||||
# Pre-compiled regular expressions.
|
||||
re_lyxfile = re.compile("\.lyx$")
|
||||
re_input = re.compile(r'^(.*)\\(input|include){(\s*)(\S+)(\s*)}.*$')
|
||||
@ -79,7 +77,7 @@ def abspath(name):
|
||||
return newname
|
||||
|
||||
|
||||
def gather_files(curfile, incfiles):
|
||||
def gather_files(curfile, incfiles, lyx2lyx):
|
||||
" Recursively gather files."
|
||||
curdir = os.path.dirname(abspath(curfile))
|
||||
is_lyxfile = re_lyxfile.search(curfile)
|
||||
@ -221,7 +219,7 @@ def main(args):
|
||||
|
||||
makezip = (os.name == 'nt')
|
||||
outdir = ""
|
||||
global lyx2lyx
|
||||
lyx2lyx = None
|
||||
|
||||
for (opt, param) in options:
|
||||
if opt == "-h":
|
||||
@ -272,7 +270,7 @@ def main(args):
|
||||
# Initialize the list with the specified LyX file and recursively
|
||||
# gather all required files (also from child documents).
|
||||
incfiles = [abspath(lyxfile)]
|
||||
gather_files(lyxfile, incfiles)
|
||||
gather_files(lyxfile, incfiles, lyx2lyx)
|
||||
|
||||
# Find the topmost dir common to all files
|
||||
if len(incfiles) > 1:
|
||||
|
Loading…
Reference in New Issue
Block a user