|
|
4c79b5 |
#!/bin/bash
|
|
|
4c79b5 |
#
|
|
|
07c2fe |
# render_doIdentityTexts.sh -- This function renders text-based
|
|
|
07c2fe |
# identity contents.
|
|
|
4c79b5 |
#
|
|
|
9f5f2e |
# Copyright (C) 2009-2011 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 |
|
|
|
15b1d2 |
# Start processing the base rendition 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.
|
|
|
5187da |
cli_printMessage "$FILE" 'AsSavedAsLine'
|
|
|
9b4d7d |
cat $INSTANCE > ${FILE}
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# Remove template instance.
|
|
|
4c79b5 |
if [[ -a $INSTANCE ]];then
|
|
|
4c79b5 |
rm $INSTANCE
|
|
|
4c79b5 |
fi
|
|
|
4c79b5 |
|
|
|
15b1d2 |
# Execute post-rendition 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 |
|
|
|
15b1d2 |
# Output separator line.
|
|
|
15b1d2 |
cli_printMessage '-' 'AsSeparatorLine'
|
|
|
4c79b5 |
|
|
|
fca9eb |
done
|
|
|
f3bce7 |
|
|
|
15b1d2 |
# Execute last-rendition actions.
|
|
|
f3bce7 |
#for ACTION in "${LASTACTIONS[@]}"; do
|
|
|
f3bce7 |
#
|
|
|
f3bce7 |
# case "$ACTION" in
|
|
|
f3bce7 |
#
|
|
|
f3bce7 |
# esac
|
|
|
f3bce7 |
#
|
|
|
f3bce7 |
#done
|
|
|
4c79b5 |
|
|
|
4c79b5 |
}
|