From 661b0481c0862498e8738e1ad5a191a962391aaf Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Feb 20 2011 17:25:10 +0000 Subject: Update function names inside `identity' functionality. --- diff --git a/Scripts/Bash/Functions/Identity/identity_render.sh b/Scripts/Bash/Functions/Identity/identity_render.sh index fa1300b..c56a306 100755 --- a/Scripts/Bash/Functions/Identity/identity_render.sh +++ b/Scripts/Bash/Functions/Identity/identity_render.sh @@ -67,7 +67,7 @@ function identity_render { # Check variables passed from artwork-specific pre-rendition # configuration scripts and make required transformations. - identity_getConfig + identity_renderConfig # Redefine action value (ACTIONVAL) based on pre-rendition # configuration script path value. Otherwise, massive diff --git a/Scripts/Bash/Functions/Identity/identity_renderBase.sh b/Scripts/Bash/Functions/Identity/identity_renderBase.sh index c1a89d7..e0b6e6d 100755 --- a/Scripts/Bash/Functions/Identity/identity_renderBase.sh +++ b/Scripts/Bash/Functions/Identity/identity_renderBase.sh @@ -43,7 +43,7 @@ function identity_renderBase { PARENTDIR=$(basename "$ACTIONVAL") # Define base location of template files. - identity_getDirTemplate + identity_renderDirTemplate # Define list of files to process. FILES=$(cli_getFilesList "${TEMPLATE}" "${FLAG_FILTER}.*\.(svgz|svg)") @@ -90,7 +90,7 @@ function identity_renderBase { fi # Define final location of output directory. - identity_getDirOutput + identity_renderDirOutput # Get relative path to file. The path string (stored in FILE) # has two parts: 1. the variable path and 2. the common path. diff --git a/Scripts/Bash/Functions/Identity/identity_renderConfig.sh b/Scripts/Bash/Functions/Identity/identity_renderConfig.sh index fe459a6..2143fa7 100755 --- a/Scripts/Bash/Functions/Identity/identity_renderConfig.sh +++ b/Scripts/Bash/Functions/Identity/identity_renderConfig.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# identity_getConfig.sh -- This function checks/validates variables +# identity_renderConfig.sh -- This function checks/validates variables # passed from artwork-specific pre-rendition configuration files. # # Copyright (C) 2009-2011 Alain Reguera Delgado @@ -24,7 +24,7 @@ # $Id$ # ---------------------------------------------------------------------- -function identity_getConfig { +function identity_renderConfig { local POSTCOUNT=0 local LASTCOUNT=0 @@ -37,13 +37,13 @@ function identity_getConfig { # Define post-rendition actions. if [[ $ACTION =~ '^POST:' ]];then - ACTION=$(identity_getConfigOption "$ACTION" '2-') + ACTION=$(identity_renderConfigOption "$ACTION" '2-') POSTACTIONS[$POSTCOUNT]="$ACTION" POSTCOUNT=$(($POSTCOUNT + 1)) # Define last-rendition actions. elif [[ $ACTION =~ '^LAST:' ]];then - ACTION=$(identity_getConfigOption "$ACTION" '2-') + ACTION=$(identity_renderConfigOption "$ACTION" '2-') LASTACTIONS[$LASTCOUNT]="$ACTION" LASTCOUNT=$(($LASTCOUNT + 1)) fi diff --git a/Scripts/Bash/Functions/Identity/identity_renderConfigOption.sh b/Scripts/Bash/Functions/Identity/identity_renderConfigOption.sh index 6f1962d..fb4f95a 100755 --- a/Scripts/Bash/Functions/Identity/identity_renderConfigOption.sh +++ b/Scripts/Bash/Functions/Identity/identity_renderConfigOption.sh @@ -1,14 +1,14 @@ #!/bin/bash # -# identity_getConfigOption.sh -- This function standardizes the way action -# values are retrived from pre-rendition configuration files. Use -# this function whenever you need to retrive action values from +# identity_renderConfigOption.sh -- This function standardizes the way +# action values are retrived from pre-rendition configuration files. +# Use this function whenever you need to retrive action values from # pre-rendition configuration script. # -# Usage: VAR=$(identity_getConfigOption "ACTION" "FIELD") +# Usage: VAR=$(identity_renderConfigOption "ACTION" "FIELD") # # VAR is the name of the variable where we store the option named -# returned by identity_getConfigOption. +# returned by identity_renderConfigOption. # # ACTION is the string definition set in the pre-rendition # configuration script that holds the action name and its options @@ -16,12 +16,9 @@ # # FIELD is the field number in the action string we want to retrive # option from. By default options start from third field on. The first -# field is reserved for the action type (i.e., BASE, POST or LAST), and -# the second field is reserved for the action itself (e.g., -# renderImage, renderFormats, etc.). Note that this convenction can be -# altered if the action string has been modified (e.g., you stript the -# BASE field from action string) and passed the modified action string -# to another function for processing. +# field is reserved for the action type (i.e., POST or LAST), and the +# second field is reserved for the action itself (e.g., renderFormats, +# renderSyslinux, renderKsplash, etc.). # # Copyright (C) 2009-2011 Alain Reguera Delgado # @@ -44,7 +41,7 @@ # $Id$ # ---------------------------------------------------------------------- -function identity_getConfigOption { +function identity_renderConfigOption { local ACTION="$1" local FIELD="$2" diff --git a/Scripts/Bash/Functions/Identity/identity_renderDirOutput.sh b/Scripts/Bash/Functions/Identity/identity_renderDirOutput.sh index 7002aa9..58ec731 100644 --- a/Scripts/Bash/Functions/Identity/identity_renderDirOutput.sh +++ b/Scripts/Bash/Functions/Identity/identity_renderDirOutput.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# identity_getDirOutput.sh -- This function defines the final +# identity_renderDirOutput.sh -- This function defines the final # absolute path the centos-art.sh script uses to store identity # contents produced at rendition time. # @@ -25,7 +25,7 @@ # $Id$ # ---------------------------------------------------------------------- -function identity_getDirOutput { +function identity_renderDirOutput { # Define base output directory using design model path as reference. OUTPUT=$(dirname $FILE | sed -r \ diff --git a/Scripts/Bash/Functions/Identity/identity_renderDirTemplate.sh b/Scripts/Bash/Functions/Identity/identity_renderDirTemplate.sh index e6c1ef5..88c563e 100644 --- a/Scripts/Bash/Functions/Identity/identity_renderDirTemplate.sh +++ b/Scripts/Bash/Functions/Identity/identity_renderDirTemplate.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# identity_getDirTemplate.sh -- This function re-defines absolute +# identity_renderDirTemplate.sh -- This function re-defines absolute # path to artwork's related design templates directory. # # Copyright (C) 2009-2011 Alain Reguera Delgado @@ -24,7 +24,7 @@ # $Id$ # ---------------------------------------------------------------------- -function identity_getDirTemplate { +function identity_renderDirTemplate { # Initialize design models location using action value as # reference. diff --git a/Scripts/Bash/Functions/Identity/identity_renderDm.sh b/Scripts/Bash/Functions/Identity/identity_renderDm.sh index 1231655..6af2231 100755 --- a/Scripts/Bash/Functions/Identity/identity_renderDm.sh +++ b/Scripts/Bash/Functions/Identity/identity_renderDm.sh @@ -58,7 +58,7 @@ function identity_renderDm { # Get display manager passed from render.conf.sh pre-rendition # configuration script. - DM=$(identity_getConfigOption "$1" '2') + DM=$(identity_renderConfigOption "$1" '2') # Sanitate display manager passed from render.conf.sh # pre-rendition configuration script. Whatever value be retrived @@ -69,7 +69,7 @@ function identity_renderDm { # Get screen resolutions passed from render.conf.sh pre-rendition # configuration script. - RESOLUTIONS=$(identity_getConfigOption "$1" '3') + RESOLUTIONS=$(identity_renderConfigOption "$1" '3') # Check screen resolutions passed from render.conf.sh # pre-rendition configuration script. diff --git a/Scripts/Bash/Functions/Identity/identity_renderFormats.sh b/Scripts/Bash/Functions/Identity/identity_renderFormats.sh index eb3c079..b731691 100644 --- a/Scripts/Bash/Functions/Identity/identity_renderFormats.sh +++ b/Scripts/Bash/Functions/Identity/identity_renderFormats.sh @@ -33,7 +33,7 @@ function identity_renderFormats { local FILE="$1" # Get image formats. - local FORMATS=$(identity_getConfigOption "$2" '2-') + local FORMATS=$(identity_renderConfigOption "$2" '2-') # Check base file existence. if [[ -f ${FILE}.png ]];then diff --git a/Scripts/Bash/Functions/Identity/identity_renderGroupByType.sh b/Scripts/Bash/Functions/Identity/identity_renderGroupByType.sh index f56c0c5..7d25aac 100755 --- a/Scripts/Bash/Functions/Identity/identity_renderGroupByType.sh +++ b/Scripts/Bash/Functions/Identity/identity_renderGroupByType.sh @@ -25,24 +25,6 @@ # array inside the appropriate `render.conf.sh' pre-configuration # script. # -# For example, the following three lines will create one jpg, ppm, -# xpm, and tif file for each png file available and groups them all by -# its file type, inside directories named as their file type (i.e. -# Png, Jpg, Ppm, Xpm, Tif). Note that in the example, groupByType is -# ivoked as post-rendition action. If you want to invoke it as -# last-rendition action use LAST definition instead of POST. -# -# ACTIONS[0]='BASE:renderImage' -# ACTIONS[1]='POST:renderFormats: jpg, ppm, xpm, tif' -# ACTIONS[2]='POST:groupByType: png, jpg, ppm, xpm, tif' -# -# groupByType function is generally used with renderFormats function. -# Both definitions must match the file type you want to have rendered -# and grouped. You don't need to specify the png file type in -# renderFormats' definition, but in groupByType's definition it must -# be specified. Otherwise png files will not be grouped inside a png -# directory. -# # Copyright (C) 2009-2011 Alain Reguera Delgado # # This program is free software; you can redistribute it and/or @@ -87,7 +69,7 @@ function identity_renderGroupByType { # Sanitate file types passed from render.conf.sh pre-rendition # configuration script. - FORMATS=$(identity_getConfigOption "$FORMATS" '2-') + FORMATS=$(identity_renderConfigOption "$FORMATS" '2-') # Check file types passed from render.conf.sh pre-rendition # configuration script. diff --git a/Scripts/Bash/Functions/Identity/identity_renderGrub.sh b/Scripts/Bash/Functions/Identity/identity_renderGrub.sh index f937509..6f2f0b2 100644 --- a/Scripts/Bash/Functions/Identity/identity_renderGrub.sh +++ b/Scripts/Bash/Functions/Identity/identity_renderGrub.sh @@ -37,7 +37,7 @@ function identity_renderGrub { # configuration script. These options are applied to pnmremap when # doing color reduction, so any option available for pnmremap # command can be passed to renderSyslinux functionality. - OPTIONS=$(identity_getConfigOption "$ACTION" '2-') + OPTIONS=$(identity_renderConfigOption "$ACTION" '2-') # Re-define 16 colors images default file name prefix using # options as reference. This is useful to differenciate final diff --git a/Scripts/Bash/Functions/Identity/identity_renderSyslinux.sh b/Scripts/Bash/Functions/Identity/identity_renderSyslinux.sh index 90d9f0f..a88e406 100755 --- a/Scripts/Bash/Functions/Identity/identity_renderSyslinux.sh +++ b/Scripts/Bash/Functions/Identity/identity_renderSyslinux.sh @@ -37,7 +37,7 @@ function identity_renderSyslinux { # configuration script. These options are applied to pnmremap when # doing color reduction, so any option available for pnmremap # command can be passed to renderSyslinux functionality. - OPTIONS=$(identity_getConfigOption "$ACTION" '2-') + OPTIONS=$(identity_renderConfigOption "$ACTION" '2-') # Check options passed to action. This is required in order to # aviod using options used already in this script. For example