From 8b5668147fd5ffb3b9038367bf2b9bfc6b793d6b Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Dec 02 2010 15:36:08 +0000 Subject: Update render_doIdentityImageDm.sh: - When we define the VERSION variable, the REGEX filtering expression was removed. The render_doIdentityImageDm is used as last-rendering action, so it is called after rendering base images. Regular expression defined for base-rendering action, may not work for last-rendering list of files, and regular expression defined for last-rendering action may not match base-rendering list of files. So, in order to avoid confusion regular expression pattern is applied to base-rendering actions. - When we verify background images, if the background image doesn't exist, skip it and continue with the next file in the list. Update render_getFilesList.sh: - Do not use begining (^) and end ($) regular expression modifiers when we redefine regular expression (REGEX) local variable inside render_getFilesList.sh file. Such definition takes place inside cli_getFilesList.sh function script. - Do not include the LOCATION to regular expression (REGEX) inside render_getFilesList. The LOCATION value is added to regular expression (REGEX) in cli_getFilesList function. --- diff --git a/Scripts/Bash/Functions/Render/render_doIdentityImageDm.sh b/Scripts/Bash/Functions/Render/render_doIdentityImageDm.sh index a7860e8..fe20533 100755 --- a/Scripts/Bash/Functions/Render/render_doIdentityImageDm.sh +++ b/Scripts/Bash/Functions/Render/render_doIdentityImageDm.sh @@ -91,9 +91,8 @@ function render_doIdentityImageDm { # directories under # trunk/Translations/Identity/Themes/Distro/BootUp/ structure, # using the centos-art.sh script. - VERSIONS=$(find $ACTIONVAL -regextype posix-egrep \ - -maxdepth 1 -type d -regex "^.*/${RELEASE_FORMAT}$" \ - | egrep $REGEX) + VERSIONS=$(find $ACTIONVAL -regextype posix-egrep -maxdepth 1 \ + -type d -regex "^.*/${RELEASE_FORMAT}$") # Check release numbers list. if [[ "$VERSIONS" == '' ]];then @@ -136,10 +135,14 @@ function render_doIdentityImageDm { for RESOLUTION in $RESOLUTIONS;do - cli_printMessage "$TGZ/${TMP}-${RESOLUTION}.tar.gz" "AsCreatingLine" - - # Check background existence for specified resolution. - cli_checkFiles "$BGS/${RESOLUTION}.png" 'f' + # Check background existence for specified resolution. If + # the background resolution doesn't exist, skip it and + # continue with the next resolution in the list. + if [[ -f "$BGS/${RESOLUTION}-final.png" ]];then + cli_printMessage "$TGZ/${TMP}-${RESOLUTION}-final.tar.gz" "AsCreatingLine" + else + continue + fi # Create temporal directory. if [[ ! -d $TMP ]]; then diff --git a/Scripts/Bash/Functions/Render/render_getFilesList.sh b/Scripts/Bash/Functions/Render/render_getFilesList.sh index f76becb..505f9ad 100644 --- a/Scripts/Bash/Functions/Render/render_getFilesList.sh +++ b/Scripts/Bash/Functions/Render/render_getFilesList.sh @@ -86,10 +86,12 @@ function render_getFilesList { EXTENSION='sed' fi - - # Re-define regular expression to match files with specific - # extensions inside specific locations. - REGEX="^$LOCATION/${REGEX}.*\.${EXTENSION}$" + + # Make regular expression (REGEX) variable local (to avoid + # concatenation the next time cli_getFilesList function be + # called), and redefine it to match files with specific extensions + # inside specific locations. + local REGEX="${REGEX}.*\.${EXTENSION}" # Define list of files to process. cli_getFilesList "$LOCATION"