Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aaa0d9a

Browse files
committed
Record the value of $TEXINPUTS in the transcript.
Job.message(): New method. Takes care of writing a message to the user and adding it to the transcript.
1 parent d8ee0e6 commit aaa0d9a

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

Doc/tools/mkhowto

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ class Job:
214214
def setup_texinputs(self):
215215
texinputs = [self.filedir] + list(self.options.base_texinputs)
216216
os.environ["TEXINPUTS"] = string.join(texinputs, os.pathsep)
217+
self.message("TEXINPUTS=" + os.environ["TEXINPUTS"])
217218

218219
__have_temps = 0
219220
def build_aux(self, binary=None):
@@ -352,18 +353,23 @@ class Job:
352353
os.unlink(self.l2h_aux_init_file)
353354

354355
def run(self, command):
355-
if not self.options.quiet:
356-
print "+++", command
357-
fp = open(self.log_filename, "a")
358-
fp.write("+++ %s\n" % command)
359-
fp.close()
360-
rc = os.system("(%s) >>%s 2>&1" % (command, self.log_filename))
356+
self.message(command)
357+
rc = os.system("(%s) </dev/null >>%s 2>&1"
358+
% (command, self.log_filename))
361359
if rc:
362360
sys.stderr.write(
363361
"Session transcript and error messages are in %s.\n"
364362
% self.log_filename)
365363
sys.exit(rc)
366364

365+
def message(self, msg):
366+
msg = "+++ " + msg
367+
if not self.options.quiet:
368+
print msg
369+
fp = open(self.log_filename, "a")
370+
fp.write(msg + "\n")
371+
fp.close()
372+
367373

368374
def safe_unlink(path):
369375
try:

0 commit comments

Comments
 (0)