Blame Scripts/Functions/Prepare/prepare_updateImages.sh

3d8c7d
#!/bin/bash
3d8c7d
#
8cbdc0
# prepare_updateImages.sh -- This option initializes image files inside
3d8c7d
# the working copy. When you provide this option, the centos-art.sh
3d8c7d
# scripts renders image files from all design models available in the
3d8c7d
# working copy. This step is required in order to satisfy dependencies
3d8c7d
# from different components inside the working copy.
3d8c7d
#
3d8c7d
# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
3d8c7d
#
3d8c7d
# This program is free software; you can redistribute it and/or modify
3d8c7d
# it under the terms of the GNU General Public License as published by
3d8c7d
# the Free Software Foundation; either version 2 of the License, or (at
3d8c7d
# your option) any later version.
3d8c7d
#
3d8c7d
# This program is distributed in the hope that it will be useful, but
3d8c7d
# WITHOUT ANY WARRANTY; without even the implied warranty of
3d8c7d
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3d8c7d
# General Public License for more details.
3d8c7d
#
3d8c7d
# You should have received a copy of the GNU General Public License
3d8c7d
# along with this program; if not, write to the Free Software
3d8c7d
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3d8c7d
#
3d8c7d
# ----------------------------------------------------------------------
3d8c7d
# $Id$
3d8c7d
# ----------------------------------------------------------------------
3d8c7d
8cbdc0
function prepare_updateImages {
3d8c7d
3d8c7d
    # Define list of directories that need to be rendered.
3d8c7d
    local DIRS=$(cli_getFilesList \
3d8c7d
        ${HOME}/artwork/trunk/Identity/Images --maxdepth="1" \
3d8c7d
        --mindepth="1" --type="d" --pattern=".+/[[:alnum:]]+$")
3d8c7d
3d8c7d
    # Execute the render functionality of centos-art.sh script to
3d8c7d
    # produce directories inside the list one by one. Producing
3d8c7d
    # directories one by one is important because themes directory is
3d8c7d
    # produced differently compared to others directories. This way,
3d8c7d
    # when we create a list of directories and pass them that way to
3d8c7d
    # centos-art.sh script, it is possible for ir to know how to
3d8c7d
    # produce each directory passed.
3d8c7d
    ${CLI_BASEDIR}/${CLI_PROGRAM}.sh render $DIRS --dont-commit-changes
3d8c7d
3d8c7d
}