Blame Scripts/Functions/Render/render_doThemeActions.sh

7d1ac0
#!/bin/bash
7d1ac0
#
7d1ac0
# render_doThemeActions.sh -- This function performs theme-specific
7d1ac0
# rendition.
7d1ac0
#
7d1ac0
# Copyright (C) 2009, 2010, 2011 The CentOS Project
7d1ac0
#
7d1ac0
# This program is free software; you can redistribute it and/or modify
7d1ac0
# it under the terms of the GNU General Public License as published by
7d1ac0
# the Free Software Foundation; either version 2 of the License, or (at
7d1ac0
# your option) any later version.
7d1ac0
#
7d1ac0
# This program is distributed in the hope that it will be useful, but
7d1ac0
# WITHOUT ANY WARRANTY; without even the implied warranty of
7d1ac0
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7d1ac0
# General Public License for more details.
7d1ac0
#
7d1ac0
# You should have received a copy of the GNU General Public License
7d1ac0
# along with this program; if not, write to the Free Software
7d1ac0
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
7d1ac0
#
7d1ac0
# ----------------------------------------------------------------------
7d1ac0
# $Id$
7d1ac0
# ----------------------------------------------------------------------
7d1ac0
7d1ac0
function render_doThemeActions {
7d1ac0
7d1ac0
    # Define patterns using the design model specified by
7d1ac0
    # FLAG_THEME_MODEL as reference to know what organization to
7d1ac0
    # create inside artistic motifs. When rendering, this condition
7d1ac0
    # let the artistic motif to be produced using the same
7d1ac0
    # organization of its design model. The intersting thing of this
7d1ac0
    # configuration is that you can have more than one design models
7d1ac0
    # and each one can has its own unique organization.
7d1ac0
    local MODELS_PATTERN=$(find \
7d1ac0
        $(cli_getRepoTLDir)/Identity/Models/Themes/Default/ \
7d1ac0
        -type d | egrep -v '\.svn' | sed -r '/^$/d' | sed -r \
7d1ac0
        "s!^.*/${FLAG_THEME_MODEL}/!!" | tr "\n" '|' \
7d1ac0
        | sed -e 's!^|!!' -e 's!|$!!')
7d1ac0
7d1ac0
    # Define list of available artistic motifs include their names and
7d1ac0
    # versions directory levels. To build this list use the theme
7d1ac0
    # design model directory structure as renference.
7d1ac0
    local MOTIFS=$(find $(cli_getRepoTLDir)/Identity/Images/Themes \
7d1ac0
        -regextype posix-egrep -type d \
7d1ac0
        -regex ".+/(${MODELS_PATTERN})$" \
7d1ac0
        | sort | egrep "$ACTIONVAL")
7d1ac0
7d1ac0
    # Redefine action value using the list of available artistic
7d1ac0
    # motifs.
7d1ac0
    for ACTIONVAL in $(echo $MOTIFS);do
7d1ac0
        render_doBaseActions
7d1ac0
    done
7d1ac0
7d1ac0
}