--- cf.schmorp.de/server/utils/cfutil.in 2007/03/12 17:26:41 1.12 +++ cf.schmorp.de/server/utils/cfutil.in 2007/03/17 19:57:02 1.18 @@ -22,6 +22,7 @@ use Coro::AIO; use POSIX (); use Digest::MD5; +use Storable; $Storable::canonical = 1; sub usage { warn <{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 +314,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 +344,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 +363,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"; } }