Author: pebender
Date: Mon Sep 15 19:21:31 2008
New Revision: 3756
Modified:
trunk/gar-minimyth/html/minimyth/document-changelog.txt
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.perl/init/conf/MM_FONT.pm
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init.d/conf.d/MM_FONT
Log:
- Changed MM_FONT_FILE_TTF_ADD so that the font files can be located in a
sub-directory of the MiniMyth read-only configuration directory.
Modified: trunk/gar-minimyth/html/minimyth/document-changelog.txt
==============================================================================
--- trunk/gar-minimyth/html/minimyth/document-changelog.txt (original)
+++ trunk/gar-minimyth/html/minimyth/document-changelog.txt Mon Sep 15
19:21:31 2008
@@ -1,7 +1,7 @@
MiniMyth Changelog
--------------------------------------------------------------------------------
-Changes since 58 (2008-09-14):
+Changes since 58 (2008-09-15):
Current MythTV versions
MythTV 0.21: version 0.21.0, release-0-21-fixes branch svn 18228.
@@ -14,6 +14,8 @@
- Added MM_PLUGIN_INFORMATION_CENTER_ENABLED for disabling (i.e.
removing)
the 'Information Center' menu.
- Added MM_THEME_FILE_MENU_ADD for overriding/extending MythTV theme
menus.
+ - Changed MM_FONT_FILE_TTF_ADD so that the font files can be located
in a
+ sub-directory of the MiniMyth read-only configuration directory.
Modified MiniMyth commands
- Changed mm_slpeed so that is saves the system clock to the hardware
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.perl/init/conf/MM_FONT.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.perl/init/conf/MM_FONT.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d.perl/init/conf/MM_FONT.pm
Mon Sep 15 19:21:31 2008
@@ -7,6 +7,8 @@
use strict;
use warnings;
+require File::Basename;
+
my %var_list;
sub var_list
@@ -37,23 +39,34 @@
$var_list{'MM_FONT_FILE_TTF_ADD'} =
{
value_default => '',
+ value_clean => sub
+ {
+ my $minimyth = shift;
+ my $name = shift;
+
+ my $value_clean = $minimyth->var_get($name);
+ $value_clean = " $value_clean ";
+ $value_clean =~ s/[ \t]+/ /g;
+ $value_clean =~ s/ ([^ \/])/ \/$1/g;
+ $value_clean =~ s/\/+/\//g;
+ $value_clean =~ s/^ //;
+ $value_clean =~ s/ $//;
+ $minimyth->var_set($name, $value_clean);
+ },
value_file => '.+',
file => sub
{
my $minimyth = shift;
my $name = shift;
- my @file;
+ my @file = ();
- foreach (split(/ +/, $minimyth->var_get($name)))
+ foreach (split(/ /, $minimyth->var_get($name)))
{
- s/\/\/+/\//g;
- s/^\///;
-
my $item;
- $item->{'name_remote'} = "/$_";
- $item->{'name_local'} = "/usr/lib/X11/fonts/TTF/$_";
- $item->{'mode_local'} = '644';
+ $item->{'name_remote'} = "$_";
+ $item->{'name_local'} = '/usr/lib/X11/fonts/TTF/' .
File::Basename::basename($_);
+ $item->{'mode_local'} = '0644';
push(@file, $item);
}
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init.d/conf.d/MM_FONT
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init.d/conf.d/MM_FONT
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/etc/rc.d/init.d/conf.d/MM_FONT
Mon Sep 15 19:21:31 2008
@@ -27,6 +27,13 @@
MM_FONT_FILE_TTF_DELETE="${font_list}"
fi
+ MM_FONT_FILE_TTF_ADD=`/bin/echo " ${MM_FONT_FILE_TTF_ADD} " | /bin/sed
\
+ -e 's%[ \t][ \t]*% %g' \
+ -e 's% \([^ /]\)% /\1%g' \
+ -e 's%//*%/%g' \
+ -e 's%^ %%' \
+ -e 's% $%%'`
+
return 0
}
@@ -40,15 +47,18 @@
}
conf_fetch_MM_FONT() {
- local font
+ local name_remote
+ local name_local
if /usr/bin/test -n "${MM_FONT_FILE_TTF_ADD}" ; then
- /bin/mkdir -p /usr/lib/X11/fonts/TTF
- for font in ${MM_FONT_FILE_TTF_ADD} ; do
- /bin/rm -f /usr/lib/X11/fonts/TTF/${font}
- mm_confro_get ${font} /usr/lib/X11/fonts/TTF/${font}
- if /usr/bin/test ! -e /usr/lib/X11/fonts/TTF/${font} ; then
- mm_message_output err "error: failed to fetch '${font}'
file."
+ /bin/mkdir -p /home/minimyth/.mythtv
+ for name_remote in ${MM_FONT_FILE_TTF_ADD} ; do
+ name_local=`/usr/bin/basename ${name_remote}`
+ name_local="/usr/lib/X11/fonts/TTF/${name_local}"
+ /bin/rm -f ${name_local}
+ mm_confro_get ${name_remote} ${name_local}
+ if /usr/bin/test ! -e ${name_local} ; then
+ mm_message_output err "error: failed to
fetch '${name_remote}' file."
fi
done
fi
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---