[system] / trunk / webwork / system / system_webwork_setup.pl Repository:
ViewVC logotype

Diff of /trunk/webwork/system/system_webwork_setup.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 8 Revision 9
465# } 465# }
466# } 466# }
467# warn "fixed $num 'use lib' lines in $file\n" if $num > 1; 467# warn "fixed $num 'use lib' lines in $file\n" if $num > 1;
468# } 468# }
469 469
470 # write the file 470 # write the file, only if there were changes
471
472 if($num) {
471 open FILE, ">$file" || die "CAN'T WRITE $file!\n Fix the problem and run the setup script again"; 473 open FILE, ">$file" || die "CAN'T WRITE $file!\n Fix the problem and run the setup script again";
472 print FILE @lines; 474 print FILE @lines;
473 close FILE || die "CAN'T CLOSE (writing) $file!\n Fix the problem and run the setup script again"; 475 close FILE || die "CAN'T CLOSE (writing) $file!\n Fix the problem and run the setup script again";
476 }
474} 477}
475 478
476print "done fixing #! and \"use\" lines.\n\n"; 479print "done fixing #! and \"use\" lines.\n\n";
477 480
478#################### create webworkInit.pm files 481#################### create webworkInit.pm files
479# uses: $mainDir 482# uses: $mainDir
480 483
481foreach my $dir ('cgi/cgi-scripts/', 'scripts/') { 484foreach my $dir ('cgi/', 'cgi/cgi-scripts/', 'scripts/', 'courseScripts/') {
482 open INIT_FILE, ">$mainDir${dir}webworkInit.pm"; 485 open INIT_FILE, ">$mainDir${dir}webworkInit.pm";
483 print INIT_FILE "use lib '${mainDir}lib/';\n1;\n"; 486 print INIT_FILE "use lib '${mainDir}lib/';\n1;\n";
484 close INIT_FILE; 487 close INIT_FILE;
485} 488}
486 489

Legend:
Removed from v.8  
changed lines
  Added in v.9

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9