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.37 by root, Tue Jul 10 16:24:00 2007 UTC vs.
Revision 1.41 by root, Mon Jul 16 19:49:34 2007 UTC

92 if (!-f "$path/regions") { 92 if (!-f "$path/regions") {
93 warn "'$path' does not look like a maps directory ('regions' file is missing).\n"; 93 warn "'$path' does not look like a maps directory ('regions' file is missing).\n";
94 exit 1 unless $FORCE; 94 exit 1 unless $FORCE;
95 } 95 }
96 96
97 system $RSYNC, "-av", "$path/.", "$DATADIR/maps/.", "--delete", "--exclude", "CVS", "--delete-excluded" 97 system $RSYNC, "-a", "--chmod=u=rwX,go=rX", "$path/.", "$DATADIR/maps/.", "--delete", "--exclude", "CVS", "--delete-excluded"
98 and die "map installation failed.\n"; 98 and die "map installation failed.\n";
99 99
100 print "maps installed successfully.\n"; 100 print "maps installed successfully.\n";
101} 101}
102 102
392 my ($dir, $file) = @{pop @res}; 392 my ($dir, $file) = @{pop @res};
393 393
394 my $data; 394 my $data;
395 aio_load "$dir/$file", $data; 395 aio_load "$dir/$file", $data;
396 396
397 my $copyright;
398 aio_load "$dir/copyright", $copyright;
399
397 $file =~ s/\.res$//; 400 $file =~ s/\.res$//;
398 $file =~ /\.([^.]+)$/ 401 $file =~ /\.([^.]+)$/
399 or next; 402 or next;
400 403
401 my $type = $1; 404 my $type = $1;
402 405
403 substr $dir, 0, 1 + length $PATH, ""; 406 substr $dir, 0, 1 + length $PATH, "";
404 407
405 $RESOURCE{"$dir/$file"} = { 408 $RESOURCE{"$dir/$file"} = {
406 type => $1, 409 type => $1,
407 copyright => "", # TODO 410 copyright => $copyright,
408 data => $data, 411 data => $data,
409 chksum => Digest::MD5::md5 $data, 412 chksum => Digest::MD5::md5 $data,
410 }; 413 };
411 } 414 }
412 } 415 }
427 push @png, ["$path/$file", 0]; 430 push @png, ["$path/$file", 0];
428 } elsif ($file =~ /\.trs$/) { 431 } elsif ($file =~ /\.trs$/) {
429 push @trs, [$path, $file]; 432 push @trs, [$path, $file];
430 } elsif ($file =~ /\.arc$/) { 433 } elsif ($file =~ /\.arc$/) {
431 push @arc, [$path, $file]; 434 push @arc, [$path, $file];
432 } elsif ($file =~ /\.(ogg|res)$/) { 435 } elsif ($file =~ /\.(ogg|jpg|res)$/) {
433 push @res, [$path, $file]; 436 push @res, [$path, $file];
434 } else { 437 } else {
435 warn "ignoring $path/$file\n" if $VERBOSE >= 3; 438 warn "ignoring $path/$file\n" if $VERBOSE >= 3;
436 } 439 }
437 } 440 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines