|
|
8af4d8 |
#!/bin/bash
|
|
|
8af4d8 |
#
|
|
|
8af4d8 |
# identity_renderSvgPostActions.sh -- This function performs
|
|
|
8af4d8 |
# post-rendition actions for SVG files.
|
|
|
8af4d8 |
#
|
|
|
8af4d8 |
# Copyright (C) 2009-2011 Alain Reguera Delgado
|
|
|
8af4d8 |
#
|
|
|
8af4d8 |
# This program is free software; you can redistribute it and/or
|
|
|
8af4d8 |
# modify it under the terms of the GNU General Public License as
|
|
|
8af4d8 |
# published by the Free Software Foundation; either version 2 of the
|
|
|
8af4d8 |
# License, or (at your option) any later version.
|
|
|
8af4d8 |
#
|
|
|
8af4d8 |
# This program is distributed in the hope that it will be useful, but
|
|
|
8af4d8 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
8af4d8 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
8af4d8 |
# General Public License for more details.
|
|
|
8af4d8 |
#
|
|
|
8af4d8 |
# You should have received a copy of the GNU General Public License
|
|
|
8af4d8 |
# along with this program; if not, write to the Free Software
|
|
|
8af4d8 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
8af4d8 |
# USA.
|
|
|
8af4d8 |
#
|
|
|
8af4d8 |
# ----------------------------------------------------------------------
|
|
|
8af4d8 |
# $Id$
|
|
|
8af4d8 |
# ----------------------------------------------------------------------
|
|
|
8af4d8 |
|
|
|
8af4d8 |
function identity_renderSvgPostActions {
|
|
|
8af4d8 |
|
|
|
8af4d8 |
local ACTION=''
|
|
|
8af4d8 |
|
|
|
05d9ae |
# Define SVG-directory-specific post-rendition actions processing
|
|
|
05d9ae |
# as local to this function. Otherwise it may confuse command-line
|
|
|
05d9ae |
# post-rendition actions.
|
|
|
05d9ae |
local -a POSTACTIONS
|
|
|
05d9ae |
|
|
|
05d9ae |
# Execute SVG-directory-specific post-rendition actions to the
|
|
|
05d9ae |
# list of post actions and last actions. This is required in order
|
|
|
05d9ae |
# to provide a predictable way of producing content inside the
|
|
|
05d9ae |
# repository and save you the time of writing long option
|
|
|
05d9ae |
# combinations each time you need to produce images inside the
|
|
|
05d9ae |
# repository.
|
|
|
05d9ae |
if [[ $TEMPLATE =~ "Distro/Backgrounds/.+\.svg$" ]];then
|
|
|
5f7579 |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='renderFormats: jpg'
|
|
|
5f7579 |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='groupByFormat: png jpg'
|
|
|
05d9ae |
elif [[ $TEMPLATE =~ "Distro/$(cli_getPathComponent '--release-pattern')/Syslinux/.+\.svg$" ]];then
|
|
|
5f7579 |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='renderSyslinux'
|
|
|
5f7579 |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='renderSyslinux:-floyd'
|
|
|
05d9ae |
elif [[ $TEMPLATE =~ "Grub" ]];then
|
|
|
5f7579 |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='renderGrub'
|
|
|
5f7579 |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='renderGrub:-floyd'
|
|
|
05d9ae |
elif [[ $TEMPLATE =~ "Distro/$(cli_getPathComponent '--release-pattern')/Ksplash/.+\.svg$" ]];then
|
|
|
5f7579 |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='renderKsplash'
|
|
|
05d9ae |
fi
|
|
|
05d9ae |
|
|
|
8af4d8 |
for ACTION in "${POSTACTIONS[@]}"; do
|
|
|
8af4d8 |
|
|
|
8af4d8 |
case "${ACTION}" in
|
|
|
8af4d8 |
|
|
|
8af4d8 |
renderSyslinux* )
|
|
|
8af4d8 |
identity_renderSyslinux
|
|
|
8af4d8 |
;;
|
|
|
8af4d8 |
|
|
|
8af4d8 |
renderGrub* )
|
|
|
8af4d8 |
identity_renderGrub
|
|
|
8af4d8 |
;;
|
|
|
8af4d8 |
|
|
|
8af4d8 |
renderBrands )
|
|
|
8af4d8 |
identity_renderBrands
|
|
|
8af4d8 |
;;
|
|
|
8af4d8 |
|
|
|
8af4d8 |
esac
|
|
|
8af4d8 |
|
|
|
8af4d8 |
done
|
|
|
8af4d8 |
|
|
|
8af4d8 |
}
|