develooper Front page | perl.perl5.porters | Postings from December 2000

Re: [ID 20000328.039] [PATCH] Eliminate Configure use of /tmp

Thread Next
From:
Andy Dougherty
Date:
December 13, 2000 07:35
Subject:
Re: [ID 20000328.039] [PATCH] Eliminate Configure use of /tmp
Message ID:
Pine.SOL.4.10.10012131031230.2017-100000@maxwell.phys.lafayette.edu
While cleaning up my open bugs in the bug db, I came across this entry:
Configure currently creates two temporary files in /tmp.  They can easily
be done in the current working directory.  This patch moves them. I sure
hope no one is running Configure as root.  (The patch is contained in the
original bug report, this is just repackaging it for metaconfig to make it
easier to apply.  It applies to Configure also.)

--- p4/metaconfig/U/modified/Head.U	Fri Oct 13 14:57:22 2000
+++ p4-andy/metaconfig/U/modified/Head.U	Wed Dec 13 10:15:47 2000
@@ -91,7 +91,7 @@
 # Generated on <DATE> [metaconfig <VERSION> PL<PATCHLEVEL>]
 # (with additional metaconfig patches by <MAINTLOC>)
 
-cat >/tmp/c1$$ <<EOF
+cat >c1$$ <<EOF
 ARGGGHHHH!!!!!
 
 SCO csh still thinks true is false.  Write to SCO today and tell them that next
@@ -102,18 +102,18 @@
 
 [End of diatribe. We now return you to your regularly scheduled programming...]
 EOF
-cat >/tmp/c2$$ <<EOF
+cat >c2$$ <<EOF
 
 OOPS!  You naughty creature!  You didn't run Configure with sh!
 I will attempt to remedy the situation by running sh for you...
 EOF
 
-true || cat /tmp/c1$$ /tmp/c2$$
+true || cat c1$$ c2$$
 true || exec sh $0 $argv:q
 
-(exit $?0) || cat /tmp/c2$$
+(exit $?0) || cat c2$$
 (exit $?0) || exec sh $0 $argv:q
-rm -f /tmp/c1$$ /tmp/c2$$
+rm -f c1$$ c2$$
 
 : compute my invocation name
 me=$0
 
-- 
    Andy Dougherty		doughera@lafayette.edu
    Dept. of Physics
    Lafayette College, Easton PA 18042


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About