--- doc/help/render.texxml.pl 2004/09/14 22:26:17 1.18 +++ doc/help/render.texxml.pl 2018/11/01 03:31:21 1.20 @@ -27,7 +27,7 @@ use strict; use Fcntl; -use POSIX qw(tmpnam); +use File::Temp; if ( scalar(@ARGV) < 2 ) { @@ -57,7 +57,7 @@ USAGE exit(); } -my $tmpdir = tmpnam(); +my $tmpdir = File::Temp::tempdir(); my $fileroot = $ARGV[1]; if (substr($fileroot, -7) eq ".texxml") @@ -104,6 +104,10 @@ system ( "cp $tmpdir/$fileroot.ps ."); print "Converting to PDF (may take a bit)...\n"; system ( "ps2pdf $fileroot.ps $fileroot.pdf" ); +print "Rescuing log and tex file for debugging ...\n"; +system ("cp $tmpdir/$fileroot.log ."); +system ("cp $tmpdir/$fileroot.tex ."); + print "Clearing temp directory...\n"; system ( "rm -rf $tmpdir" ); @@ -113,5 +117,5 @@ if ( -e $fileroot . ".ps" ) } else { - print "Generationr of $fileroot.ps failed.\n"; + print "Generation of $fileroot.ps failed.\n"; }