summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-03-11 12:08:21 (GMT)
committerFred Drake <fdrake@acm.org>1998-03-11 12:08:21 (GMT)
commitc9f2c14d49d88ecc868a30e23ae043e03789bff3 (patch)
treee2694c313ef8ab6ce51aa15403fc1428fb36a134 /Doc
parentbc8ad5bdeb14c943e937caae0e0300ac903fc72b (diff)
downloadcpython-c9f2c14d49d88ecc868a30e23ae043e03789bff3.zip
cpython-c9f2c14d49d88ecc868a30e23ae043e03789bff3.tar.gz
cpython-c9f2c14d49d88ecc868a30e23ae043e03789bff3.tar.bz2
Somewhat more direct way of locating the file, using __FILE__.
Leave find_my_file() around for now, even though we're not using it at the moment.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/perl/l2hinit.perl9
1 files changed, 7 insertions, 2 deletions
diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl
index 96146e9..75c39a8 100644
--- a/Doc/perl/l2hinit.perl
+++ b/Doc/perl/l2hinit.perl
@@ -34,11 +34,16 @@ sub find_my_file{
$mydir;
}
+
# A little painful, but lets us clean up the top level directory a little,
# and not be tied to the current directory (as far as I can tell).
#
-$mydir = &find_my_file("l2hinit.perl");
-#print "\nmy dir = $mydir\n";
+use Cwd;
+use File::Basename;
+($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
+chop $mydir; # remove trailing '/'
+$mydir = getcwd() . "$dd$mydir"
+ unless $mydir =~ s|^/|/|;
$LATEX2HTMLSTYLES = "$mydir$envkey$LATEX2HTMLSTYLES";