--- deliantra/server/utils/cfutil.in 2007/03/12 17:26:41 1.12 +++ deliantra/server/utils/cfutil.in 2007/03/14 04:12:29 1.15 @@ -69,14 +69,17 @@ sub inst_maps($) { my (undef, $path) = @_; - print "installing '$path' to '$DATADIR/maps'\n\n"; + print "installing '$path' to '$DATADIR/maps'\n"; if (!-f "$path/regions") { warn "'$path' does not look like a maps directory ('regions' file is missing).\n"; exit 1 unless $FORCE; } - system $RSYNC, "-av", "$path/.", "$DATADIR/maps/.", "--delete", "--exclude", "CVS", "--delete-excluded"; + system $RSYNC, "-av", "$path/.", "$DATADIR/maps/.", "--delete", "--exclude", "CVS", "--delete-excluded" + or die "map installation failed.\n"; + + print "maps installed successfully.\n"; } { @@ -86,7 +89,6 @@ our $TRS; our $NFILE; our %ANIM; - our $SMOOTH; our (@png, @trs, @arc); # files we are interested in @@ -256,7 +258,12 @@ } if (my $smooth = delete $o->{smoothface}) { - $SMOOTH .= "$smooth\n"; + my ($face, $smooth) = split /\s+/, $smooth; + # skip empty_S.x11, it seems to server no purpose whatsoever + # but increases bandwidth demands and worse. + unless ($smooth eq "empty_S.x11") { + $FACEINFO{$face}{smooth} = $smooth; + } } } } @@ -306,7 +313,7 @@ sub inst_arch($) { my (undef, $path) = @_; - print "installing '$path' to '$DATADIR'\n\n"; + print "installing '$path' to '$DATADIR'\n"; if (!-d "$path/treasures") { warn "'$path' does not look like an arch directory ('treasures' directory is missing).\n"; @@ -336,12 +343,6 @@ } { - open my $fh, ">:utf8", "$DATADIR/smooth~" - or die "$DATADIR/smooth~: $!"; - print $fh $SMOOTH; - } - - { open my $fh, ">:utf8", "$DATADIR/treasures~" or die "$DATADIR/treasures~: $!"; print $fh $TRS; @@ -361,13 +362,17 @@ open my $fh, ">:perlio", "$DATADIR/faces~" or die "$DATADIR/faces~: $!"; + $FACEINFO{""} = { version => 1}; print $fh Storable::nfreeze \%FACEINFO; } - for (qw(archetypes faces animations treasures smooth)) { + for (qw(archetypes faces animations treasures)) { chmod 0644, "$DATADIR/$_~"; - rename "$DATADIR/$_~", "$DATADIR/$_"; + rename "$DATADIR/$_~", "$DATADIR/$_" + or die "$DATADIR/$_: $!"; } + + print "archetype data installed successfully.\n"; } }