aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xminimun9
1 files changed, 6 insertions, 3 deletions
diff --git a/minimun b/minimun
index 923426c..ac369cb 100755
--- a/minimun
+++ b/minimun
@@ -3,16 +3,19 @@ use strict;
use warnings;
use IPC::Run qw(run);
+use Time::HiRes qw( time );
-my ($in, $out);
+my $in;
$in .= "\\award\n";
$in .= "\\bye\n";
-run ['/usr/bin/pdftex', 'format.tex'], '<', \$in, '>', \$out;
+my $timestamp = time;
+run ['/usr/bin/pdftex', '-jobname', "$timestamp", 'format.tex'], '<', \$in;
print "Content-type: application/pdf\n\n";
-open(DOC, '<', 'format.pdf');
+open(DOC, '<', "$timestamp.pdf");
while (<DOC>){
print;
}
close(DOC);
+unlink "$timestamp.pdf", "$timestamp.log";