|
|
4c79b5 |
#!/bin/bash
|
|
|
4c79b5 |
#
|
|
|
ab1d67 |
# render.sh -- This function initializes rendition variables and
|
|
|
294842 |
# actions to centos-art.sh script.
|
|
|
4c79b5 |
#
|
|
|
9f5f2e |
# Copyright (C) 2009-2011 Alain Reguera Delgado
|
|
|
fa95b1 |
#
|
|
|
fa95b1 |
# This program is free software; you can redistribute it and/or modify
|
|
|
fa95b1 |
|
|
|
dcd347 |
|
|
|
dcd347 |
|
|
|
fa95b1 |
#
|
|
|
74a058 |
|
|
|
74a058 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# General Public License for more details.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# along with this program; if not, write to the Free Software
|
|
|
dcd347 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
4c79b5 |
# ----------------------------------------------------------------------
|
|
|
418249 |
# $Id$
|
|
|
4c79b5 |
# ----------------------------------------------------------------------
|
|
|
4c79b5 |
|
|
|
ab1d67 |
function render {
|
|
|
4c79b5 |
|
|
|
d538ed |
local ACTIONNAM=''
|
|
|
4d7186 |
local ACTIONVAL=''
|
|
|
4d7186 |
|
|
|
61bb5b |
|
|
|
61bb5b |
|
|
|
61bb5b |
|
|
|
49237e |
local FLAG_RELEASEVER=''
|
|
|
15b1d2 |
|
|
|
61bb5b |
|
|
|
61bb5b |
|
|
|
61bb5b |
|
|
|
61bb5b |
|
|
|
49237e |
local FLAG_BASEARCH=''
|
|
|
c9f7fa |
|
|
|
61bb5b |
|
|
|
61bb5b |
|
|
|
61bb5b |
|
|
|
294842 |
local FLAG_THEME_MODEL='Default'
|
|
|
294842 |
|
|
|
61bb5b |
|
|
|
61bb5b |
# whether convert or not content produced by centos-art
|
|
|
61bb5b |
|
|
|
61bb5b |
local FLAG_CONVERT=''
|
|
|
b463d6 |
|
|
|
61bb5b |
|
|
|
61bb5b |
# rotate or not image content produced by centos-art
|
|
|
61bb5b |
|
|
|
61bb5b |
local FLAG_ROTATE=''
|
|
|
61bb5b |
|
|
|
61bb5b |
|
|
|
61bb5b |
# resize or not content produced by centos-art base-rendition. By
|
|
|
61bb5b |
|
|
|
61bb5b |
local FLAG_RESIZE=''
|
|
|
61bb5b |
|
|
|
61bb5b |
|
|
|
61bb5b |
# whether grouping or not content produced by centos-art
|
|
|
61bb5b |
|
|
|
b463d6 |
local FLAG_GROUPED_BY=''
|
|
|
b463d6 |
|
|
|
49237e |
# Interpret arguments and options passed through command-line.
|
|
|
d3dc02 |
render_getArguments
|
|
|
4c79b5 |
|
|
|
49237e |
# Redefine positional parameters using ARGUMENTS. At this point,
|
|
|
49237e |
|
|
|
49237e |
|
|
|
49237e |
eval set -- "$ARGUMENTS"
|
|
|
49237e |
|
|
|
d538ed |
|
|
|
d538ed |
|
|
|
d538ed |
|
|
|
d538ed |
ACTIONNAM="${FUNCNAME}_doBaseActions"
|
|
|
d538ed |
|
|
|
eb2554 |
|
|
|
eb2554 |
|
|
|
49237e |
for ACTIONVAL in "$@";do
|
|
|
49237e |
|
|
|
49237e |
|
|
|
49237e |
|
|
|
49237e |
|
|
|
49237e |
cli_checkRepoDirSource
|
|
|
49237e |
|
|
|
fa7ad5 |
|
|
|
fa7ad5 |
|
|
|
fa7ad5 |
|
|
|
fa7ad5 |
|
|
|
fa7ad5 |
if [[ ! $ACTIONVAL =~ "^$(cli_getRepoTLDir)/(Identity/Images|$(cli_getPathComponent '--theme-pattern'))" ]];then
|
|
|
fa7ad5 |
cli_printMessage "`gettext "The path provided doesn't support rendition."`" 'AsErrorLine'
|
|
|
fa7ad5 |
cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine'
|
|
|
fa7ad5 |
fi
|
|
|
fa7ad5 |
|
|
|
49237e |
|
|
|
49237e |
|
|
|
49237e |
|
|
|
49237e |
|
|
|
49237e |
cli_syncroRepoChanges
|
|
|
49237e |
|
|
|
d538ed |
|
|
|
d538ed |
if [[ $ACTIONNAM =~ "^${FUNCNAM}_[A-Za-z]+$" ]];then
|
|
|
d538ed |
eval $ACTIONNAM
|
|
|
d538ed |
else
|
|
|
d538ed |
cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine'
|
|
|
eee226 |
cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine'
|
|
|
d538ed |
fi
|
|
|
49237e |
|
|
|
49237e |
|
|
|
49237e |
|
|
|
49237e |
|
|
|
49237e |
|
|
|
49237e |
cli_commitRepoChanges
|
|
|
49237e |
|
|
|
49237e |
done
|
|
|
49237e |
|
|
|
4c79b5 |
}
|