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.12 by root, Mon Mar 12 17:26:41 2007 UTC vs.
Revision 1.13 by root, Mon Mar 12 17:33:12 2007 UTC

67} 67}
68 68
69sub inst_maps($) { 69sub inst_maps($) {
70 my (undef, $path) = @_; 70 my (undef, $path) = @_;
71 71
72 print "installing '$path' to '$DATADIR/maps'\n\n"; 72 print "installing '$path' to '$DATADIR/maps'\n";
73 73
74 if (!-f "$path/regions") { 74 if (!-f "$path/regions") {
75 warn "'$path' does not look like a maps directory ('regions' file is missing).\n"; 75 warn "'$path' does not look like a maps directory ('regions' file is missing).\n";
76 exit 1 unless $FORCE; 76 exit 1 unless $FORCE;
77 } 77 }
78 78
79 system $RSYNC, "-av", "$path/.", "$DATADIR/maps/.", "--delete", "--exclude", "CVS", "--delete-excluded"; 79 system $RSYNC, "-av", "$path/.", "$DATADIR/maps/.", "--delete", "--exclude", "CVS", "--delete-excluded"
80 or die "map installation failed.\n";
81
82 print "maps installed successfully.\n";
80} 83}
81 84
82{ 85{
83 our %PNG32; 86 our %PNG32;
84 our %FACEINFO; 87 our %FACEINFO;
304 } 307 }
305 308
306 sub inst_arch($) { 309 sub inst_arch($) {
307 my (undef, $path) = @_; 310 my (undef, $path) = @_;
308 311
309 print "installing '$path' to '$DATADIR'\n\n"; 312 print "installing '$path' to '$DATADIR'\n";
310 313
311 if (!-d "$path/treasures") { 314 if (!-d "$path/treasures") {
312 warn "'$path' does not look like an arch directory ('treasures' directory is missing).\n"; 315 warn "'$path' does not look like an arch directory ('treasures' directory is missing).\n";
313 exit 1 unless $FORCE; 316 exit 1 unless $FORCE;
314 } 317 }
364 print $fh Storable::nfreeze \%FACEINFO; 367 print $fh Storable::nfreeze \%FACEINFO;
365 } 368 }
366 369
367 for (qw(archetypes faces animations treasures smooth)) { 370 for (qw(archetypes faces animations treasures smooth)) {
368 chmod 0644, "$DATADIR/$_~"; 371 chmod 0644, "$DATADIR/$_~";
369 rename "$DATADIR/$_~", "$DATADIR/$_"; 372 rename "$DATADIR/$_~", "$DATADIR/$_"
373 or die "$DATADIR/$_: $!";
370 } 374 }
375
376 print "archetype data installed successfully.\n";
371 } 377 }
372} 378}
373 379
374Getopt::Long::Configure ("bundling", "no_ignore_case"); 380Getopt::Long::Configure ("bundling", "no_ignore_case");
375GetOptions ( 381GetOptions (

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines