Blame Scripts/Bash/Functions/Render/render_getIdentityBase.sh

d27df4
#!/bin/bash
d27df4
#
6523cc
# render_getIdentityBase.sh -- This function initiates rendition features
d27df4
# taking BASEACTIONS as reference.
d27df4
#
d27df4
# Copyright (C) 2009-2011 Alain Reguera Delgado
d27df4
# 
d27df4
# This program is free software; you can redistribute it and/or
d27df4
# modify it under the terms of the GNU General Public License as
d27df4
# published by the Free Software Foundation; either version 2 of the
d27df4
# License, or (at your option) any later version.
d27df4
# 
d27df4
# This program is distributed in the hope that it will be useful, but
d27df4
# WITHOUT ANY WARRANTY; without even the implied warranty of
d27df4
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
d27df4
# General Public License for more details.
d27df4
#
d27df4
# You should have received a copy of the GNU General Public License
d27df4
# along with this program; if not, write to the Free Software
d27df4
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
d27df4
# USA.
d27df4
# 
d27df4
# ----------------------------------------------------------------------
d27df4
# $Id$
d27df4
# ----------------------------------------------------------------------
d27df4
6523cc
function render_getIdentityBase {
d27df4
d659a9
    local FILES=''
ddde89
    local PARENTDIR=''
ddde89
    local TEMPLATE=''
ddde89
    local COMMONDIR=''
ddde89
    local COMMONDIRCOUNT=0
d659a9
    local -a COMMONDIRS
d27df4
d27df4
    # Redefine parent directory for current workplace.
fe15c4
    PARENTDIR=$(basename "$ACTIONVAL")
d27df4
ddde89
    # Define base location of template files.
ddde89
    render_getIdentityDirTemplate
ddde89
    
ddde89
    # Define list of files to process. 
ddde89
    FILES=$(cli_getFilesList "${TEMPLATE}" "${FLAG_FILTER}.*\.(svgz|svg)")
ddde89
ddde89
    # Set action preamble.
ddde89
    cli_printActionPreamble "${FILES}"
ddde89
ddde89
    # Define common absolute paths in order to know when centos-art.sh
ddde89
    # is leaving a directory structure and entering into another. This
ddde89
    # information is required in order for centos-art.sh to know when
ddde89
    # to apply last-rendition actions.
ddde89
    for COMMONDIR in $(dirname "$FILES" | sort | uniq);do
ddde89
        COMMONDIRS[$COMMONDIRCOUNT]=$(dirname "$COMMONDIR")
ddde89
        COMMONDIRCOUNT=$(($COMMONDIRCOUNT + 1))
d27df4
    done
d27df4
ddde89
    # Execute base-rendition action.
ddde89
    render_doIdentityImages
ddde89
d27df4
}