Blame Scripts/Bash/Functions/Verify/info_getPathFonts.sh

3b853a
#!/bin/bash
3b853a
#
59c0e3
# info_getPathFonts.sh -- This function checks user's fonts
3b853a
# directory. In order for some artworks to be rendered correctly,
3b853a
# denmark font needs to be available. By default, denmark font doesn't
3b853a
# come with CentOS distribution so create a symbolic link (from the
3b853a
# one we have inside repository) to make it available if it isn't yet.
3b853a
#
3b853a
# Copyright (C) 2009-2010 Alain Reguera Delgado
3b853a
# 
3b853a
# This program is free software; you can redistribute it and/or modify
3b853a
# it under the terms of the GNU General Public License as published by
3b853a
# the Free Software Foundation; either version 2 of the License, or
3b853a
# (at your option) any later version.
3b853a
# 
3b853a
# This program is distributed in the hope that it will be useful, but
3b853a
# WITHOUT ANY WARRANTY; without even the implied warranty of
3b853a
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3b853a
# General Public License for more details.
3b853a
#
3b853a
# You should have received a copy of the GNU General Public License
3b853a
# along with this program; if not, write to the Free Software
3b853a
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
3b853a
# USA.
3b853a
# 
3b853a
# ----------------------------------------------------------------------
3b853a
# $Id$
3b853a
# ----------------------------------------------------------------------
3b853a
59c0e3
function info_getPathFonts {
3b853a
3b853a
    # Define variables as local to avoid conflicts outside.
3b853a
    local -a REPODIRS
3b853a
    local -a REPOFILES
3b853a
    local -a REPOLINKS
3b853a
3b853a
    # Define font related directories.
3b853a
    REPODIRS[0]=/home/centos/.fonts
3b853a
    REPODIRS[1]=/home/centos/artwork/trunk/Identity/Fonts/Ttf
3b853a
3b853a
    # Define font related files.
3b853a
    REPOFILES=${REPODIRS[0]}/denmark.ttf
3b853a
3b853a
    # Define font related symbolic links.
3b853a
    REPOLINKS=${REPODIRS[1]}/denmark.ttf
3b853a
3b853a
    # Check defined directories, files, and symbolic links.
3b853a
    cli_checkFiles "${REPODIRS[@]}" 
3b853a
    cli_checkFiles "${REPOFILES[@]}"
3b853a
    cli_checkFiles "${REPOLINKS[@]}"
3b853a
3b853a
}