mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
08ad6acd9a
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7031 a592a061-630c-0410-9148-cb99ea01b6c8
24 lines
584 B
Python
24 lines
584 B
Python
#! /usr/bin/env python
|
|
# This script converts a xfig file into Postscript/LaTeX files
|
|
|
|
import sys
|
|
import os
|
|
|
|
filename = sys.argv[1]
|
|
basename = os.path.splitext(filename)[0]
|
|
parameters = sys.argv[2:]
|
|
|
|
pid = os.fork()
|
|
if pid == 0:
|
|
os.execvp("fig2dev", ["fig2dev", "-Lpstex"] + parameters + [filename, basename + ".eps"])
|
|
print "fig2dev did not work"
|
|
os.exit(1)
|
|
os.wait()
|
|
|
|
pid = os.fork()
|
|
if pid == 0:
|
|
os.execvp("fig2dev", ["fig2dev", "-Lpstex_t", "-p" + basename] + parameters + [filename, basename + ".pstex_t"])
|
|
print "fig2dev did not work the second time"
|
|
os.exit(1)
|
|
os.wait()
|