version 1.2, 2002/07/17 15:47:15
|
version 1.6, 2003/04/01 03:20:01
|
Line 29
|
Line 29
|
|
|
use strict; |
use strict; |
use GDBM_File; |
use GDBM_File; |
|
use File::Spec; |
|
|
my $dirprefix = "../../loncom/html/adm/help/"; |
# I had to chdir, because neither glob nor bsd_glob accept globs |
|
# with ".." in them... sucky. |
|
chdir "../../loncom/html/adm/help/"; |
|
|
# if the topic hash exists, kill it |
# if the topic hash exists, kill it |
unlink 'fragmentLabels.gdbm' if ( -e $dirprefix . 'fragmentTopics.gdbm' ); |
unlink 'fragmentLabels.gdbm' if ( -e 'fragmentLabels.gdbm' ); |
|
print "Wiped old fragmentLabels.gdbm.\n"; |
|
|
tie (my %fragmentLabels, 'GDBM_File', $dirprefix . 'fragmentLabels.gdbm', 1, 0); |
tie (my %fragmentLabels, 'GDBM_File', 'fragmentLabels.gdbm', &GDBM_WRCREAT(), 0660); |
my $error = 0; |
my $error = 0; |
|
|
chdir $dirprefix; |
chdir "tex"; |
|
|
while (<*.tex>) |
foreach my $file ( glob("*.tex") ) |
{ |
{ |
my $file; |
|
$file = $_; |
|
open F, $file; |
open F, $file; |
|
if ( index($file, "/") != "/" ) |
|
{ |
|
$file = substr($file, index($file, "/") + 1); |
|
} |
my $contents = join("\n", <F>); |
my $contents = join("\n", <F>); |
my $label; |
my $label; |
|
|