From: Dekel Tsur Date: Fri, 2 Nov 2001 16:28:29 +0000 (+0000) Subject: insetexternal: Do not run update command if result file exists and is up to X-Git-Tag: 1.6.10~20405 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7a57795f2082505e579c57b4c6bf3ac0ee115ace;p=features.git insetexternal: Do not run update command if result file exists and is up to date. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2960 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/ChangeLog b/lib/ChangeLog index f6577abe55..1ba7c28d3e 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2001-11-02 Dekel Tsur + + * external_templates: Use UpdateResult + + * scripts/*.py: Fix for python 1.5 + 2001-10-31 Jean-Marc Lasgouttes * examples/iecc05.fen: diff --git a/lib/external_templates b/lib/external_templates index 28760b22d8..78ad5b2a47 100644 --- a/lib/external_templates +++ b/lib/external_templates @@ -24,15 +24,18 @@ Template RasterImage Format LaTeX Product "\\includegraphics{$$Basename.eps}" UpdateCommand "convert $$Parameters $$FName $$Basename.eps" + UpdateResult "$$Basename.eps" Requirement "graphics" FormatEnd Format Ascii Product "$$Contents(\"$$Basename.asc\")" UpdateCommand "python $$Sysdir/scripts/pic2ascii.py $$FName $$Parameters" + UpdateResult "$$Basename.asc" FormatEnd Format DocBook Product "" UpdateCommand "python $$Sysdir/scripts/pic2png_eps.py $$FName $$Parameters" + UpdateResult "$$Basename.eps" FormatEnd Format LinuxDoc Product "[Bitmap: $$FName]" @@ -66,15 +69,18 @@ Template XFig Format LaTeX Product "\\begin{picture}(0,0)\\includegraphics{$$Basename.eps}\\end{picture}\\input{$$Basename.pstex_t}" UpdateCommand "python $$Sysdir/scripts/fig2pstex.py $$FName $$Parameters" + UpdateResult "$$Basename.eps" Requirement "graphics" FormatEnd Format Ascii Product "$$Contents(\"$$Basename.asc\")" UpdateCommand "python $$Sysdir/scripts/pic2ascii.py $$FName $$Parameters" + UpdateResult "$$Basename.asc" FormatEnd Format DocBook Product "" UpdateCommand "python $$Sysdir/scripts/pic2png_eps.py $$FName $$Parameters" + UpdateResult "$$Basename.eps" FormatEnd Format LinuxDoc Product "[XFig: $$FName]" @@ -114,6 +120,7 @@ Template ChessDiagram Format Ascii Product "$$Contents(\"$$Basename.asc\")" UpdateCommand "python $$Sysdir/scripts/fen2ascii.py $$FName $$Basename.asc" + UpdateResult "$$Basename.asc" FormatEnd Format DocBook Product "[Chess: $$Basename]" diff --git a/lib/scripts/general_command_wrapper.py b/lib/scripts/general_command_wrapper.py index 700441757c..7ed2397541 100644 --- a/lib/scripts/general_command_wrapper.py +++ b/lib/scripts/general_command_wrapper.py @@ -8,9 +8,6 @@ import sys import os -import os.path - - if sys.argv[1] != "-": os.close(0) diff --git a/lib/scripts/pic2ascii.py b/lib/scripts/pic2ascii.py index 069fd1bae6..16395cac24 100644 --- a/lib/scripts/pic2ascii.py +++ b/lib/scripts/pic2ascii.py @@ -4,7 +4,6 @@ import sys import os -import os.path import string pid = os.fork() diff --git a/lib/scripts/pic2png_eps.py b/lib/scripts/pic2png_eps.py index 90d868db3c..864431bddd 100644 --- a/lib/scripts/pic2png_eps.py +++ b/lib/scripts/pic2png_eps.py @@ -3,7 +3,6 @@ import sys import os -import os.path if len(sys.argv) > 2: pars = sys.argv[2]