|
|
8af4d8 |
#!/bin/bash
|
|
|
8af4d8 |
#
|
|
|
ab1d67 |
# render_doSvgLastActions.sh -- This function performs
|
|
|
8af4d8 |
# last-rendition actions for SVG files.
|
|
|
8af4d8 |
#
|
|
|
8af4d8 |
# Copyright (C) 2009-2011 Alain Reguera Delgado
|
|
|
fa95b1 |
#
|
|
|
fa95b1 |
# This program is free software; you can redistribute it and/or modify
|
|
|
fa95b1 |
# it under the terms of the GNU General Public License as published by
|
|
|
dcd347 |
# the Free Software Foundation; either version 2 of the License, or (at
|
|
|
dcd347 |
# your option) any later version.
|
|
|
fa95b1 |
#
|
|
|
74a058 |
# This program is distributed in the hope that it will be useful, but
|
|
|
74a058 |
# 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
|
|
|
dcd347 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
8af4d8 |
# ----------------------------------------------------------------------
|
|
|
8af4d8 |
# $Id$
|
|
|
8af4d8 |
# ----------------------------------------------------------------------
|
|
|
8af4d8 |
|
|
|
ab1d67 |
function render_doSvgLastActions {
|
|
|
8af4d8 |
|
|
|
8af4d8 |
local ACTION=''
|
|
|
8af4d8 |
|
|
|
8af4d8 |
# Verify position of file being produced in the list of files been
|
|
|
8af4d8 |
# currently processed.
|
|
|
05d9ae |
if [[ $THIS_FILE_DIR == $NEXT_FILE_DIR ]];then
|
|
|
05d9ae |
return
|
|
|
05d9ae |
fi
|
|
|
8af4d8 |
|
|
|
05d9ae |
# Define SVG-directory-specific last-rendition actions processing
|
|
|
05d9ae |
# as local to this function. Otherwise it may confuse command-line
|
|
|
05d9ae |
# last-rendition actions.
|
|
|
05d9ae |
local -a LASTACTIONS
|
|
|
8af4d8 |
|
|
|
05d9ae |
# Add directory-specific last-rendition actions to the list of
|
|
|
05d9ae |
# post actions and last actions. This is required in order to
|
|
|
05d9ae |
# 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/$(cli_getPathComponent '--release-pattern')/Gdm/.+\.svg$" ]];then
|
|
|
5f7579 |
LASTACTIONS[((++${#LASTACTIONS[*]}))]='renderDm:Gdm:800x600 1024x768 1280x1024 1360x768 2048x1536 2560x1240'
|
|
|
05d9ae |
elif [[ $TEMPLATE =~ "Distro/$(cli_getPathComponent '--release-pattern')/Kdm/.+\.svg$" ]];then
|
|
|
5f7579 |
LASTACTIONS[((++${#LASTACTIONS[*]}))]='renderDm:Kdm:800x600 1024x768 1280x1024 1360x768 2048x1536 2560x1240'
|
|
|
05d9ae |
elif [[ $TEMPLATE =~ "Distro/$(cli_getPathComponent '--release-pattern')/Ksplash/.+\.svg$" ]];then
|
|
|
5f7579 |
LASTACTIONS[((++${#LASTACTIONS[*]}))]='renderKsplash'
|
|
|
05d9ae |
fi
|
|
|
8af4d8 |
|
|
|
05d9ae |
# At this point centos-art.sh should be producing the last file
|
|
|
05d9ae |
# from the same unique directory structure, so, before producing
|
|
|
05d9ae |
# images for the next directory structure lets execute
|
|
|
05d9ae |
# last-rendition actions for the current directory structure.
|
|
|
05d9ae |
for ACTION in "${LASTACTIONS[@]}"; do
|
|
|
8af4d8 |
|
|
|
05d9ae |
case "${ACTION}" in
|
|
|
8af4d8 |
|
|
|
05d9ae |
renderKsplash )
|
|
|
ab1d67 |
render_doKsplash
|
|
|
05d9ae |
;;
|
|
|
8af4d8 |
|
|
|
05d9ae |
renderDm:* )
|
|
|
ab1d67 |
render_doDm
|
|
|
05d9ae |
;;
|
|
|
8af4d8 |
|
|
|
05d9ae |
esac
|
|
|
8af4d8 |
|
|
|
05d9ae |
done
|
|
|
8af4d8 |
|
|
|
05d9ae |
}
|