summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2008-12-23 09:55:59 +0100
committerYorhel <git@yorhel.nl>2008-12-23 09:55:59 +0100
commitb65c057afb9849bfcbefa08b40c7a548f5e3a6a7 (patch)
tree5de496289ec75a71b7f893271db208fbd94823fd /util
parent99c38fd5886778178cd752a91ca41d9686de0ce6 (diff)
Removed skin directory name from the config files, and renamed fullname to name
Diffstat (limited to 'util')
-rwxr-xr-xutil/skingen.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/util/skingen.pl b/util/skingen.pl
index 4a1db17f..95aa8d63 100755
--- a/util/skingen.pl
+++ b/util/skingen.pl
@@ -29,6 +29,7 @@ sub readskin { # skin name
$o{$1} = $2;
}
close $F;
+ $o{_name} = $name;
return \%o;
}
@@ -37,7 +38,7 @@ sub writeskin { # $obj
my $o = shift;
# fix image locations
- $o->{$_} && ($o->{$_} = '/s/'.$o->{name}.'/'.$o->{$_}) for (qw|imglefttop imgrighttop|);
+ $o->{$_} && ($o->{$_} = '/s/'.$o->{_name}.'/'.$o->{$_}) for (qw|imglefttop imgrighttop|);
# get the right top image
if($o->{imgrighttop}) {
@@ -60,8 +61,8 @@ sub writeskin { # $obj
# create boxbg.png
my $img = Image::Magick->new(size => '1x1');
$img->Read('xc:'.$o->{boxbg});
- $img->Write(filename => $ROOT.'/static/s/'.$o->{name}.'/boxbg.png');
- $o->{_boxbg} = '/s/'.$o->{name}.'/boxbg.png';
+ $img->Write(filename => $ROOT.'/static/s/'.$o->{_name}.'/boxbg.png');
+ $o->{_boxbg} = '/s/'.$o->{_name}.'/boxbg.png';
# get the blend color
$img = Image::Magick->new(size => '1x1');
@@ -71,7 +72,7 @@ sub writeskin { # $obj
# write the CSS
open my $CSS, '<', "$ROOT/data/skingen/style.css" or die $!;
- open my $SKIN, '>', "$ROOT/static/s/$o->{name}/style.css" or die $!;
+ open my $SKIN, '>', "$ROOT/static/s/$o->{_name}/style.css" or die $!;
while((my $d = <$CSS>)) {
$d =~ s/\$$_\$/$o->{$_}/g for (keys %$o);
print $SKIN $d;