|
|
878a2b |
#!/bin/bash
|
|
|
878a2b |
#
|
|
|
878a2b |
# svg_doPostActions.sh -- This function performs post-rendition
|
|
|
878a2b |
# actions for SVG files.
|
|
|
878a2b |
#
|
|
|
878a2b |
# Copyright (C) 2009, 2010, 2011 The CentOS Project
|
|
|
878a2b |
#
|
|
|
878a2b |
# This program is free software; you can redistribute it and/or modify
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
#
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
# General Public License for more details.
|
|
|
878a2b |
#
|
|
|
878a2b |
|
|
|
878a2b |
# along with this program; if not, write to the Free Software
|
|
|
878a2b |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
878a2b |
#
|
|
|
878a2b |
# ----------------------------------------------------------------------
|
|
|
878a2b |
# $Id$
|
|
|
878a2b |
# ----------------------------------------------------------------------
|
|
|
878a2b |
|
|
|
878a2b |
function svg_doPostActions {
|
|
|
878a2b |
|
|
|
878a2b |
local ACTION=''
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
local -a POSTACTIONS
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
local COMMENT="`gettext "Created in CentOS Artwork Repository"` ($(cli_printUrl '--projects-artwork'))"
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
# applied to base-rendition output and base-rendition output is
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
POSTACTIONS[((++${#POSTACTIONS[*]}))]="doPostCommand:png:mogrify -comment '$COMMENT'"
|
|
|
878a2b |
[[ $FLAG_POSTRENDITION != '' ]] && POSTACTIONS[((++${#POSTACTIONS[*]}))]="doPostCommand:png:${FLAG_POSTRENDITION}"
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
if [[ $FLAG_DONT_DIRSPECIFIC == 'false' ]];then
|
|
|
878a2b |
|
|
|
878a2b |
if [[ $TEMPLATE =~ 'trunk/Identity/(Models|Images)/Themes/.+\.svg$' ]];then
|
|
|
878a2b |
|
|
|
878a2b |
POSTACTIONS[((++${#POSTACTIONS[*]}))]="convertPngToBranded"
|
|
|
878a2b |
|
|
|
878a2b |
if [[ $TEMPLATE =~ "Backgrounds/.+\.svg$" ]];then
|
|
|
878a2b |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='convertPngTo:jpg'
|
|
|
878a2b |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='groupBy:png jpg'
|
|
|
878a2b |
|
|
|
878a2b |
elif [[ $TEMPLATE =~ "Concept/.+\.svg$" ]];then
|
|
|
878a2b |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='convertPngTo:jpg pdf'
|
|
|
878a2b |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='convertPngToThumbnail:250'
|
|
|
878a2b |
|
|
|
878a2b |
elif [[ $TEMPLATE =~ "Distro/$(cli_getPathComponent --release-pattern)/Syslinux/.+\.svg$" ]];then
|
|
|
878a2b |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='convertPngToSyslinux:'
|
|
|
878a2b |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='convertPngToSyslinux:-floyd'
|
|
|
878a2b |
|
|
|
878a2b |
elif [[ $TEMPLATE =~ "Distro/$(cli_getPathComponent --release-pattern)/Grub/.+\.svg$" ]];then
|
|
|
878a2b |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='convertPngToGrub:'
|
|
|
878a2b |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='convertPngToGrub:-floyd'
|
|
|
878a2b |
|
|
|
878a2b |
elif [[ $TEMPLATE =~ "Posters/.+\.svg$" ]];then
|
|
|
878a2b |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='convertPngTo:jpg pdf'
|
|
|
878a2b |
fi
|
|
|
878a2b |
|
|
|
878a2b |
elif [[ $TEMPLATE =~ "trunk/Identity/Models/Brands/.+\.svg$" ]];then
|
|
|
878a2b |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='convertPngToBrands'
|
|
|
878a2b |
|
|
|
878a2b |
elif [[ $TEMPLATE =~ "trunk/Identity/Models/Icons/.+\.svg$" ]];then
|
|
|
878a2b |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='convertPngToIcons'
|
|
|
878a2b |
|
|
|
878a2b |
elif [[ $TEMPLATE =~ "trunk/Identity/Models/Manuals.+\.svg$" ]];then
|
|
|
878a2b |
POSTACTIONS[((++${#POSTACTIONS[*]}))]='convertPngTo:jpg pdf'
|
|
|
878a2b |
|
|
|
878a2b |
fi
|
|
|
878a2b |
|
|
|
878a2b |
fi
|
|
|
878a2b |
|
|
|
878a2b |
|
|
|
878a2b |
for ACTION in "${POSTACTIONS[@]}"; do
|
|
|
878a2b |
svg_$(echo "$ACTION" | cut -d: -f1)
|
|
|
878a2b |
done
|
|
|
878a2b |
|
|
|
878a2b |
}
|