linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* minor TMPDIR fix
@ 2003-09-03 19:27 carbonated beverage
  2003-09-03 20:07 ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: carbonated beverage @ 2003-09-03 19:27 UTC (permalink / raw)
  To: linux-kernel

Hi,

	Just a small fix to make the makeman script use $TMPDIR from the
environment if it's set.

	Sent it to the listed maintainer, mec, but he said he's not active
in the kernel development anymore.  I'll send out a patch to update the
MAINTAINERS file if anyone can tell me who it should be set to.

-- DN
Daniel

--- 1.2/scripts/makeman	Thu Aug 14 18:17:42 2003
+++ edited/scripts/makeman	Wed Sep  3 01:51:53 2003
@@ -12,7 +12,7 @@
 ##             $3 -- the filename which contained the sgmldoc output
 ##                     (I need this so I know which manpages to convert)
 
-my($LISTING, $GENERATED, $INPUT, $OUTPUT, $front, $mode, $filename);
+my($LISTING, $GENERATED, $INPUT, $OUTPUT, $front, $mode, $filename, $tmpdir);
 
 if($ARGV[0] eq ""){
   die "Usage: makeman [convert | install] <dir> <file>\n";
@@ -132,9 +132,13 @@
       }
     }
     close INPUT;
-
-    system("cd $ARGV[1]; docbook2man $filename.sgml; mv $filename.9 /tmp/$$.9\n");
-    open GENERATED, "< /tmp/$$.9";
+    if($ENV{'TMPDIR'}) {
+        $tmpdir=$ENV{'TMPDIR'};
+    } else {
+        $tmpdir="/tmp";
+    }
+    system("cd $ARGV[1]; docbook2man $filename.sgml; mv $filename.9 $tmpdir/$$.9\n");
+    open GENERATED, "< $tmpdir/$$.9";
     open OUTPUT, "> $ARGV[1]/$filename.9";
 
     print OUTPUT "$front";
@@ -146,7 +150,7 @@
     close GENERATED;
 
     system("gzip -f $ARGV[1]/$filename.9\n");
-    unlink("/tmp/$filename.9");
+    unlink("$tmpdir/$filename.9");
   }
 }
 elsif($ARGV[0] eq "install"){


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-04 12:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-03 19:27 minor TMPDIR fix carbonated beverage
2003-09-03 20:07 ` Sam Ravnborg
2003-09-04 12:50   ` Michael Still

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).