diff options
author | Fred Drake <fdrake@acm.org> | 1999-03-03 21:57:58 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1999-03-03 21:57:58 (GMT) |
commit | aaa0d9a3a472cf6b3c82a6267d28a29cdf687dd2 (patch) | |
tree | 703c14b815974f6553bc8884a8f3f75bca8087fe | |
parent | d8ee0e6ca5d9c1c7071963749a1ef1d2f23e9222 (diff) | |
download | cpython-aaa0d9a3a472cf6b3c82a6267d28a29cdf687dd2.zip cpython-aaa0d9a3a472cf6b3c82a6267d28a29cdf687dd2.tar.gz cpython-aaa0d9a3a472cf6b3c82a6267d28a29cdf687dd2.tar.bz2 |
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.
-rwxr-xr-x | Doc/tools/mkhowto | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Doc/tools/mkhowto b/Doc/tools/mkhowto index 0f7f2d1..bc9333b 100755 --- a/Doc/tools/mkhowto +++ b/Doc/tools/mkhowto @@ -214,6 +214,7 @@ class Job: def setup_texinputs(self): texinputs = [self.filedir] + list(self.options.base_texinputs) os.environ["TEXINPUTS"] = string.join(texinputs, os.pathsep) + self.message("TEXINPUTS=" + os.environ["TEXINPUTS"]) __have_temps = 0 def build_aux(self, binary=None): @@ -352,18 +353,23 @@ class Job: os.unlink(self.l2h_aux_init_file) def run(self, command): - if not self.options.quiet: - print "+++", command - fp = open(self.log_filename, "a") - fp.write("+++ %s\n" % command) - fp.close() - rc = os.system("(%s) >>%s 2>&1" % (command, self.log_filename)) + self.message(command) + rc = os.system("(%s) </dev/null >>%s 2>&1" + % (command, self.log_filename)) if rc: sys.stderr.write( "Session transcript and error messages are in %s.\n" % self.log_filename) sys.exit(rc) + def message(self, msg): + msg = "+++ " + msg + if not self.options.quiet: + print msg + fp = open(self.log_filename, "a") + fp.write(msg + "\n") + fp.close() + def safe_unlink(path): try: |