[LON-CAPA-cvs] cvs: loncom /localize/localize synch.pl
www
lon-capa-cvs@mail.lon-capa.org
Fri, 26 Sep 2003 18:39:48 -0000
www Fri Sep 26 14:39:48 2003 EDT
Modified files:
/loncom/localize/localize synch.pl
Log:
Synching appears to work.
Index: loncom/localize/localize/synch.pl
diff -u loncom/localize/localize/synch.pl:1.3 loncom/localize/localize/synch.pl:1.4
--- loncom/localize/localize/synch.pl:1.3 Fri Sep 26 14:22:59 2003
+++ loncom/localize/localize/synch.pl Fri Sep 26 14:39:48 2003
@@ -20,19 +20,29 @@
print "Reading: ".$_."\n";
%master=(%master,&readlexicon($_));
}
-foreach $fn (<*.pm>) {
+
+foreach my $fn (<*.pm>) {
print "Synching: ".$fn."\n";
- my %lang=&readlexicon($_);
- system ("cp $fn $fn.original");
+ my %lang=&readlexicon($fn);
+ system ("cp $fn $fn.original");
open(IN,$fn.'.original');
open(OUT,'>'.$fn);
my $found=0;
- foreach (<IN>) {
+ while (<IN>) {
if ($_=~/\#\s*SYNCMARKER/) { $found=1; last; }
print OUT $_;
}
if ($found) {
- print OUT "\n\#SYNC ".localtime."\n";
+ print OUT "\n\#SYNC ".localtime()."\n";
+ foreach (sort keys %master) {
+ unless ($lang{$_}) {
+ print OUT (<<ENDNEW);
+ '$_'
+=> '$_',
+
+ENDNEW
+ }
+ }
print OUT "\n\#SYNCMARKER\n";
foreach (<IN>) {