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.15 by root, Wed Mar 14 04:12:29 2007 UTC vs.
Revision 1.18 by root, Sat Mar 17 19:57:02 2007 UTC

20use Crossfire; 20use Crossfire;
21use Coro; 21use Coro;
22use Coro::AIO; 22use Coro::AIO;
23use POSIX (); 23use POSIX ();
24use Digest::MD5; 24use Digest::MD5;
25use Storable; $Storable::canonical = 1;
25 26
26sub usage { 27sub usage {
27 warn <<EOF; 28 warn <<EOF;
28Usage: cfutil [-v] [-q] [--force] [--cache] 29Usage: cfutil [-v] [-q] [--force] [--cache]
29 [--install-arch path] 30 [--install-arch path]
75 warn "'$path' does not look like a maps directory ('regions' file is missing).\n"; 76 warn "'$path' does not look like a maps directory ('regions' file is missing).\n";
76 exit 1 unless $FORCE; 77 exit 1 unless $FORCE;
77 } 78 }
78 79
79 system $RSYNC, "-av", "$path/.", "$DATADIR/maps/.", "--delete", "--exclude", "CVS", "--delete-excluded" 80 system $RSYNC, "-av", "$path/.", "$DATADIR/maps/.", "--delete", "--exclude", "CVS", "--delete-excluded"
80 or die "map installation failed.\n"; 81 and die "map installation failed.\n";
81 82
82 print "maps installed successfully.\n"; 83 print "maps installed successfully.\n";
83} 84}
84 85
85{ 86{
121 my ($w, $h) = unpack "NN", $1; 122 my ($w, $h) = unpack "NN", $1;
122 123
123 (my $face = $path) =~ s/^.*\///; 124 (my $face = $path) =~ s/^.*\///;
124 my $T = 32; 125 my $T = 32;
125 126
126 unless ($face =~ s/\.base\.(...)\.png$/.$1/) { 127 unless ($face =~ s/\.32x32\.png$//) {
127 warn "$path: weird filename, skipping.\n"; 128 warn "$path: weird filename, skipping.\n";
128 next; 129 next;
129 } 130 }
130 131
131 if ($w < $T || $h < $T) { 132 if ($w < $T || $h < $T) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines