Skip to contentSkip to conversation

minor TMPDIR fix

PATCH carbonated beverage 3 participants 3 messages Sep 3, 2003 – Sep 4, 2003

lore
Share & tools
lore
#0 lore raw

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

scripts/makeman +9 -5
@@ -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"){
#1 lore raw
Quoted 4 lines · carbonated beverage

Hi,

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

Michael Still contributed this script - I have added him in to:

Sam

Quoted 50 lines

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

scripts/makeman +9 -6
@@ -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"){
 
-

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw

On Wed, 3 Sep 2003, Sam Ravnborg wrote:

Sam, Mr Beverage (or can I just call you Carbonated?)

Quoted 7 lines · carbonated beverage
Quoted 4 lines

Hi,

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

Michael Still contributed this script - I have added him in to:

Thanks for the patch... I'm playing with that script at the moment, so the timing was really good from my perspective. I'll be sending an update to LKML in the next few days, and I'll include this.

Thanks,
Mikal

Signature · 3 lines
Michael Still ([email protected]) | "All my life I've had one dream,
http://www.stillhq.com            |  to achieve my many goals"
UTC + 10                          |    -- Homer Simpson