Blame tcar-scripts-prepare/Modules/Images/images.sh

Alain Reguera Delgado c554f1
#!/bin/bash
Alain Reguera Delgado c554f1
######################################################################
Alain Reguera Delgado c554f1
#
Alain Reguera Delgado c554f1
#   images.sh -- This function renders all configuration images files
Alain Reguera Delgado c554f1
#   inside the repository, using the render module and the correct
Alain Reguera Delgado c554f1
#   production order.
Alain Reguera Delgado c554f1
#
Alain Reguera Delgado c554f1
#   Written by:
Alain Reguera Delgado c554f1
#   * Alain Reguera Delgado <al@centos.org.cu>, 2009-2013
Alain Reguera Delgado c554f1
#
Alain Reguera Delgado c554f1
# Copyright (C) 2009-2013 The CentOS Artwork SIG
Alain Reguera Delgado c554f1
#
Alain Reguera Delgado c554f1
# This program is free software; you can redistribute it and/or modify
Alain Reguera Delgado c554f1
# it under the terms of the GNU General Public License as published by
Alain Reguera Delgado c554f1
# the Free Software Foundation; either version 2 of the License, or (at
Alain Reguera Delgado c554f1
# your option) any later version.
Alain Reguera Delgado c554f1
#
Alain Reguera Delgado c554f1
# This program is distributed in the hope that it will be useful, but
Alain Reguera Delgado c554f1
# WITHOUT ANY WARRANTY; without even the implied warranty of
Alain Reguera Delgado c554f1
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Alain Reguera Delgado c554f1
# General Public License for more details.
Alain Reguera Delgado c554f1
#
Alain Reguera Delgado c554f1
# You should have received a copy of the GNU General Public License
Alain Reguera Delgado c554f1
# along with this program; if not, write to the Free Software
Alain Reguera Delgado c554f1
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Alain Reguera Delgado c554f1
#
Alain Reguera Delgado c554f1
######################################################################
Alain Reguera Delgado c554f1
Alain Reguera Delgado c554f1
function images {
Alain Reguera Delgado c554f1
Alain Reguera Delgado c554f1
    # CAUTION: The order in which repository components are processed
Alain Reguera Delgado c554f1
    # affect the final result. For instance, in order for theme images
Alain Reguera Delgado c554f1
    # to hold the CentOS branding information the `Artworks/Brands'
Alain Reguera Delgado c554f1
    # directory must be rendered before the `Artworks/Themes'
Alain Reguera Delgado c554f1
    # directory.  The reason of this is that brand images are not
Alain Reguera Delgado c554f1
    # drawn inside theme design models but combined with them using
Alain Reguera Delgado c554f1
    # ImageMagick, once they both have been rendered as PNG files.
Alain Reguera Delgado c554f1
Alain Reguera Delgado c554f1
    # Define base location where configuration files will be searched
Alain Reguera Delgado c554f1
    # from. You can provide more than one location here.
Alain Reguera Delgado c554f1
    local DIRS="\
Alain Reguera Delgado c554f1
        Artworks/Brands\
Alain Reguera Delgado c554f1
        Artworks/Documentation\
Alain Reguera Delgado c554f1
        Artworks/Themes"
Alain Reguera Delgado c554f1
Alain Reguera Delgado c554f1
    # Define the name of the option you want to look configuration
Alain Reguera Delgado c554f1
    # files for.
Alain Reguera Delgado c554f1
    local NAME='render-type'
Alain Reguera Delgado c554f1
Alain Reguera Delgado c554f1
    # Define the value of the option you want to look configuration
Alain Reguera Delgado c554f1
    # files for.
Alain Reguera Delgado c554f1
    local VALUE='svg'
Alain Reguera Delgado c554f1
Alain Reguera Delgado c554f1
    # Render configuration files that match specified options and
Alain Reguera Delgado c554f1
    # values in the search directories.
Alain Reguera Delgado c554f1
    prepare_setRenderEnvironment -o "${NAME}" -v "${VALUE}" "${DIRS}" 
Alain Reguera Delgado c554f1
Alain Reguera Delgado c554f1
}