ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/utils/cfutil.in
(Generate patch)

Comparing deliantra/server/utils/cfutil.in (file contents):
Revision 1.58 by root, Tue Aug 21 19:44:57 2007 UTC vs.
Revision 1.62 by root, Mon Sep 10 18:30:30 2007 UTC

96 if (!-f "$path/regions") { 96 if (!-f "$path/regions") {
97 warn "'$path' does not look like a maps directory ('regions' file is missing).\n"; 97 warn "'$path' does not look like a maps directory ('regions' file is missing).\n";
98 exit 1 unless $FORCE; 98 exit 1 unless $FORCE;
99 } 99 }
100 100
101 system $RSYNC, "-a", "--chmod=u=rwX,go=rX", "$path/.", "$DATADIR/maps/.", "--delete", "--exclude", "CVS", "--delete-excluded" 101 system $RSYNC, "-av", "--chmod=u=rwX,go=rX",
102 "$path/.", "$DATADIR/maps/.",
103 "--exclude", "CVS", "--exclude", "/world-precomposed",
104 "--delete", "--delete-excluded"
102 and die "map installation failed.\n"; 105 and die "map installation failed.\n";
103 106
104 print "maps installed successfully.\n"; 107 print "maps installed successfully.\n";
105} 108}
106 109
173 176
174 (my $base = $stem) =~ s/^.*\///; 177 (my $base = $stem) =~ s/^.*\///;
175 178
176 my $fi = $FACEINFO{$base}; 179 my $fi = $FACEINFO{$base};
177 unless ($fi) { 180 unless ($fi) {
178 warn "$path: <$base> not referenced by any archetype, skipping.\n"; 181 #warn "$path: <$base> not referenced by any archetype, skipping.\n";
179 next; 182 #next;
180 } 183 }
181 184
182 my $arc = $FACEINFO{$base}{arc} 185 my $arc = $fi->{arc} || { };
183 or die "FATAL: internal error <$base>, cannot continue";
184 186
185 unless ($path =~ /~$/) { 187 unless ($path =~ /~$/) {
186 # possibly enlarge 188 # possibly enlarge
187 if (0 > aio_stat "$stem.64x64.png") { 189 if (0 > aio_stat "$stem.64x64.png") {
188 my $other = "$stem.64x64.png~"; 190 my $other = "$stem.64x64.png~";
495 my ($dir, $file, $type) = @$job; 497 my ($dir, $file, $type) = @$job;
496 498
497 my $data; 499 my $data;
498 aio_load "$dir/$file", $data; 500 aio_load "$dir/$file", $data;
499 501
502
500 my $meta = load_cached "$dir/meta", sub { JSON::XS::from_json shift }; 503 my $meta = load_cached "$dir/meta", sub { JSON::XS->new->utf8->relaxed->decode (shift) };
501 504
502 next if $meta && !exists $meta->{$file}; 505 utf8::decode $dir;
506 utf8::decode $file;
507
508 # a meta file for resources is now mandatory
509 unless (exists $meta->{$file}) {
510 warn "skipping $dir/$file\n" if $VERBOSE >= 3;
511 next;
512 }
503 513
504 $meta = { 514 $meta = {
505 %{ $meta->{"" } || {} }, 515 %{ $meta->{"" } || {} },
506 %{ $meta->{$file} || {} }, 516 %{ $meta->{$file} || {} },
507 }; 517 };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines