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.41 by root, Mon Jul 16 19:49:34 2007 UTC vs.
Revision 1.43 by root, Mon Jul 23 23:38:18 2007 UTC

21use Crossfire; 21use Crossfire;
22use Coro; 22use Coro;
23use Coro::AIO; 23use Coro::AIO;
24use POSIX (); 24use POSIX ();
25use Digest::MD5; 25use Digest::MD5;
26use Carp;
26use Coro::Storable; $Storable::canonical = 1; 27use Coro::Storable; $Storable::canonical = 1;
28
29$SIG{QUIT} = sub { Carp::cluck "QUIT" };
27 30
28sub usage { 31sub usage {
29 warn <<EOF; 32 warn <<EOF;
30Usage: cfutil [-v] [-q] [--force] [--cache] 33Usage: cfutil [-v] [-q] [--force] [--cache]
31 [--install-arch path] 34 [--install-arch path]
423 my ($dirs, $nondirs) = @_; 426 my ($dirs, $nondirs) = @_;
424 427
425 find_files "$path/$_" 428 find_files "$path/$_"
426 for grep $_ !~ /^(?:CVS|dev)$/, @$dirs; 429 for grep $_ !~ /^(?:CVS|dev)$/, @$dirs;
427 430
431 my $dir = $path;
432 substr $dir, 0, 1 + length $PATH, "";
433
428 for my $file (@$nondirs) { 434 for my $file (@$nondirs) {
435 if ($file =~ /\.(ogg|jpg|res)$/ || $dir =~ /^res(?:\/|$)/) {
436 push @res, [$path, $file];
429 if ($file =~ /\.png$/) { 437 } elsif ($file =~ /\.png$/) {
430 push @png, ["$path/$file", 0]; 438 push @png, ["$path/$file", 0];
431 } elsif ($file =~ /\.trs$/) { 439 } elsif ($file =~ /\.trs$/) {
432 push @trs, [$path, $file]; 440 push @trs, [$path, $file];
433 } elsif ($file =~ /\.arc$/) { 441 } elsif ($file =~ /\.arc$/) {
434 push @arc, [$path, $file]; 442 push @arc, [$path, $file];
435 } elsif ($file =~ /\.(ogg|jpg|res)$/) {
436 push @res, [$path, $file];
437 } else { 443 } else {
438 warn "ignoring $path/$file\n" if $VERBOSE >= 3; 444 warn "ignoring $path/$file\n" if $VERBOSE >= 3;
439 } 445 }
440 } 446 }
441 }; 447 };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines