Changeset 11178 for trunk/gsdl/bin/script/exportcol.pl
- Timestamp:
- 2006-02-01T10:11:10+13:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/exportcol.pl
r10339 r11178 160 160 } 161 161 162 # if we want to use netscape, check that the lanugage pack has been installed. What's best to check? for now, use one of the english image files 163 if ($use_netscape) { 164 my $search_image = &util::filename_cat ($ENV{'GSDLHOME'}, "images", "en", "tsrchgr.gif"); 165 if (!-e $search_image) { 166 &gsprintf($out, "{exportcol.fail} {exportcol.lang_pack_not_installed}\n"); 167 die "\n"; 168 } 169 } 170 162 171 # check each collection 163 172 my @valid_coll_list = (); … … 286 295 } 287 296 288 &util::cp_r ($imagesdir, $gsdldir); 297 # images. If not using netscape, copy only the top level, not any subdirs 298 if ($use_netscape) { 299 &util::cp_r ($imagesdir, $gsdldir); 300 } else { 301 &util::cp_r_toplevel ($imagesdir, $gsdldir); 302 } 289 303 &util::cp_r ($macrosdir, $gsdldir); 290 304 &util::cp_r ($mappingsdir, $gsdldir); … … 300 314 &util::cp ($gsdlcollageappletjar, $binjavadir); 301 315 316 317 # if we have netscape 4 bundled, then switch to ns4 compat macro file 318 if ($use_netscape) { 319 my $main_cfg_file = &util::filename_cat($etcdir, "main.cfg"); 320 open INFILE, "<$main_cfg_file"; 321 open OUTFILE, ">$main_cfg_file.tmp"; 322 my $line; 323 while ($line = <INFILE>) { 324 if ($line =~ s/nav_css\.dm/nav_ns4\.dm/) { 325 print OUTFILE $line; 326 last; # stop matching once we have found the line 327 } else { 328 print OUTFILE "$line"; 329 } 330 } 331 # continue with no checking 332 while ($line = <INFILE>) { 333 print OUTFILE "$line"; 334 } 335 close INFILE; 336 close OUTFILE; 337 &util::mv("$main_cfg_file.tmp", $main_cfg_file); 338 } 339 302 340 # now change the home.dm macro file to a simple version 303 341 my $newmacrodir = &util::filename_cat ($gsdldir, "macros");
Note:
See TracChangeset
for help on using the changeset viewer.