fontconfig: generate fontconfig cache on boot and move hack to support user installed fonts form xbmc init

This commit is contained in:
Gregor Fuis 2012-08-26 17:46:48 +02:00
parent 1dcffa0ba1
commit e1dfd65ca2
4 changed files with 43 additions and 20 deletions

View File

@ -36,16 +36,6 @@ fi
# hack: make addon-bins executable
chmod +x /storage/.xbmc/addons/*/bin/* > /dev/null 2>&1
# hack to support user installed fonts
SUBFONTS="/storage/.xbmc/userdata/fonts"
if [ -d "$SUBFONTS" ]; then
files=$(ls $SUBFONTS/*.[tT][tT][fF] 2>/dev/null | wc -l)
if [ "$files" = "0" ]; then
cp /usr/share/xbmc/media/Fonts/*.[tT][tT][fF] $SUBFONTS/
fi
mount --bind $SUBFONTS /usr/share/xbmc/media/Fonts/
fi
# starting autostart script (will be removed later again, dont use it!!!)
AUTOSTART="/storage/.config/autostart.sh"
if [ -f $AUTOSTART ]; then

View File

@ -36,16 +36,6 @@ fi
# hack: make addon-bins executable
chmod +x /storage/.xbmc/addons/*/bin/* > /dev/null 2>&1
# hack to support user installed fonts
SUBFONTS="/storage/.xbmc/userdata/fonts"
if [ -d "$SUBFONTS" ]; then
files=$(ls $SUBFONTS/*.[tT][tT][fF] 2>/dev/null | wc -l)
if [ "$files" = "0" ]; then
cp /usr/share/xbmc/media/Fonts/*.[tT][tT][fF] $SUBFONTS/
fi
mount --bind $SUBFONTS /usr/share/xbmc/media/Fonts/
fi
# starting autostart script (will be removed later again, dont use it!!!)
AUTOSTART="/storage/.config/autostart.sh"
if [ -f $AUTOSTART ]; then

View File

@ -0,0 +1,43 @@
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# start Avahi Daemon
#
# runlevels: openelec, textmode
FC_CACHE_DIRS="/usr/share/fonts/ /usr/share/xbmc/media/Fonts/"
# hack to support user installed fonts
SUBFONTS="/storage/.xbmc/userdata/fonts"
if [ -d "$SUBFONTS" ]; then
files=$(ls $SUBFONTS/*.[tT][tT][fF] 2>/dev/null | wc -l)
if [ "$files" = "0" ]; then
cp /usr/share/xbmc/media/Fonts/*.[tT][tT][fF] $SUBFONTS/
fi
mount --bind $SUBFONTS /usr/share/xbmc/media/Fonts/
fi
(
progress "Creating fontconfig cache"
fc-cache $FC_CACHE_DIRS
)&