|
|
4c79b5 |
#!/bin/bash
|
|
|
4c79b5 |
#
|
|
|
07c2fe |
# render_doIdentityTexts.sh -- This function renders text-based
|
|
|
07c2fe |
# identity contents.
|
|
|
4c79b5 |
#
|
|
|
7cd8e9 |
# Copyright (C) 2009, 2010 Alain Reguera Delgado
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
# This program is free software; you can redistribute it and/or
|
|
|
4c79b5 |
# modify it under the terms of the GNU General Public License as
|
|
|
4c79b5 |
# published by the Free Software Foundation; either version 2 of the
|
|
|
4c79b5 |
# License, or (at your option) any later version.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
# This program is distributed in the hope that it will be useful, but
|
|
|
4c79b5 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
4c79b5 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
4c79b5 |
# General Public License for more details.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
# You should have received a copy of the GNU General Public License
|
|
|
4c79b5 |
# along with this program; if not, write to the Free Software
|
|
|
4c79b5 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
4c79b5 |
# USA.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
# ----------------------------------------------------------------------
|
|
|
418249 |
# $Id$
|
|
|
4c79b5 |
# ----------------------------------------------------------------------
|
|
|
4c79b5 |
|
|
|
4c79b5 |
function render_doIdentityTexts {
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# Start processing the base rendering list of FILES. Fun part
|
|
|
4c79b5 |
# approching :-).
|
|
|
4c79b5 |
for FILE in $FILES; do
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# Call identity shared variable definitions.
|
|
|
4c79b5 |
render_getIdentityDefs
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# Render text file.
|
|
|
4c79b5 |
cli_printMessage "`gettext "Saved as"`: $FILE"
|
|
|
4c79b5 |
cat $INSTANCE > $FILE
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# Remove template instance.
|
|
|
4c79b5 |
if [[ -a $INSTANCE ]];then
|
|
|
4c79b5 |
rm $INSTANCE
|
|
|
4c79b5 |
fi
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# Execute post-rendering actions.
|
|
|
f3bce7 |
for ACTION in "${POSTACTIONS[@]}"; do
|
|
|
4c79b5 |
|
|
|
4c79b5 |
case "$ACTION" in
|
|
|
4c79b5 |
|
|
|
4c79b5 |
formatText:* )
|
|
|
4c79b5 |
render_doIdentityTextFormats "$FILE" "$ACTION"
|
|
|
4c79b5 |
;;
|
|
|
4c79b5 |
|
|
|
4c79b5 |
esac
|
|
|
4c79b5 |
|
|
|
4c79b5 |
done
|
|
|
4c79b5 |
|
|
|
4c79b5 |
echo '----------------------------------------------------------------------'
|
|
|
4c79b5 |
|
|
|
4c79b5 |
done \
|
|
|
e92b23 |
| awk -f /home/centos/artwork/trunk/Scripts/Bash/Styles/output_forTwoColumns.awk
|
|
|
f3bce7 |
|
|
|
f3bce7 |
# Execute last-rendering actions.
|
|
|
f3bce7 |
#for ACTION in "${LASTACTIONS[@]}"; do
|
|
|
f3bce7 |
#
|
|
|
f3bce7 |
# case "$ACTION" in
|
|
|
f3bce7 |
#
|
|
|
f3bce7 |
# esac
|
|
|
f3bce7 |
#
|
|
|
f3bce7 |
#done
|
|
|
4c79b5 |
|
|
|
4c79b5 |
}
|