From 841480c242e1b9638f3842a751a228fcbfe2b6b2 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Sep 25 2010 23:45:08 +0000 Subject: * Add rendering support through centos-art.sh script to branches branches directories. In order to this configuration to take effect you need to add a symbolic link from the branches directory to trunk/Scripts directory. For example to make centos-art.sh script available under /home/centos/artwork/branches directory you need to create the following symbolic link: ln -s /home/centos/artwork/trunk/Scripts /home/centos/artwork/branches/Scripts Once the the symbolic link is available, you can use the centos-art.sh script as you usually have used it inside trunk/ structure. For example, run the following command: centos-art render --entry=branches/Identity/Themes/Motifs/TreeFlower/0.1/Info to render branch 0.1 of TreeFlower's info directory. In this configuration, pre-rendering configuration scripts, design models, and translations files inside trunk structure are re-used inside branches structures. This way, you only need to maintain one translations structure (that inside trunk/Translations), one theme models structure (that inside trunk/Identity/Themes/Models), and one scripts structure (that inside trunk/Scripts) for both trunk/ and branches/ artworks. * In this commit the regular expression used to determine the theme name inside cli_getThemeName function was updated to support the schema themename/release used inside branches paths. For example, the following trunk's path: trunk/Identity/Themes/TreeFlower/Info can have many branches as the following: branches/Identity/Themes/TreeFlower/0.1/Info branches/Identity/Themes/TreeFlower/0.2/Info branches/Identity/Themes/TreeFlower/0.3/Info The release number should match the value of RELEASE_FORMAT variable. --- diff --git a/Scripts/Bash/Functions/Render/render_doIdentityImages.sh b/Scripts/Bash/Functions/Render/render_doIdentityImages.sh index a1f1ca8..e1c378b 100644 --- a/Scripts/Bash/Functions/Render/render_doIdentityImages.sh +++ b/Scripts/Bash/Functions/Render/render_doIdentityImages.sh @@ -88,7 +88,7 @@ function render_doIdentityImages { --export-png=$FILE.png \ | sed -r -e "s!Area !`gettext "Area"`: !" \ -e "s!Background RRGGBBAA:!`gettext "Background"`: RRGGBBAA!" \ - -e "s!Bitmap saved as:.+/trunk/!`gettext "Saved as"`: trunk/!" + -e "s!Bitmap saved as:.+/(trunk|branches|tags)/!`gettext "Saved as"`: \1/!" # Remove template instance. if [[ -a $INSTANCE ]];then diff --git a/Scripts/Bash/Functions/Render/render_getActionsIdentity.sh b/Scripts/Bash/Functions/Render/render_getActionsIdentity.sh index ac24e83..fbc069a 100755 --- a/Scripts/Bash/Functions/Render/render_getActionsIdentity.sh +++ b/Scripts/Bash/Functions/Render/render_getActionsIdentity.sh @@ -81,9 +81,9 @@ function render_getActionsIdentity { # configuration script path value. Otherwise massive rendering # may fail. Functions like renderImage need to know the exact # artwork path (that is, where images will be stored). - OPTIONVAL=$(dirname $(echo $FILE \ - | sed -r 's!Scripts/Bash/Functions/Render/Config/Identity/!Identity/!' \ - | sed -r "s!Themes/!Themes/Motifs/$(cli_getThemeName)/!")) + OPTIONVAL=$(dirname $(echo $FILE | sed -r \ + -e 's!Scripts/Bash/Functions/Render/Config/Identity/!Identity/!' \ + -e "s!Themes/!Themes/Motifs/$(cli_getThemeName)/!")) # Re-define artwork identification. ARTCOMP=$(echo $OPTIONVAL | cut -d/ -f6-) diff --git a/Scripts/Bash/Functions/cli_getThemeName.sh b/Scripts/Bash/Functions/cli_getThemeName.sh index 970bdfd..351b0de 100755 --- a/Scripts/Bash/Functions/cli_getThemeName.sh +++ b/Scripts/Bash/Functions/cli_getThemeName.sh @@ -29,9 +29,9 @@ function cli_getThemeName { local THEMENAME='' - if [[ $OPTIONVAL =~ '^.+/Themes/Motifs/([A-Za-z0-9-]+)+/.+$' ]];then + if [[ $OPTIONVAL =~ '^.+/Themes/Motifs/([A-Za-z0-9-]+)/.+$' ]];then THEMENAME=$(echo $OPTIONVAL \ - | sed -r 's!^.+/Themes/Motifs/([A-Za-z0-9-]+)+/.+!\1!') + | sed -r "s!^.+/Themes/Motifs/([A-Za-z0-9-]+(/${RELEASE_FORMAT})?)/.+!\1!") fi echo $THEMENAME diff --git a/Scripts/Bash/Functions/cli_printMessage.sh b/Scripts/Bash/Functions/cli_printMessage.sh index c25f313..ab2d850 100755 --- a/Scripts/Bash/Functions/cli_printMessage.sh +++ b/Scripts/Bash/Functions/cli_printMessage.sh @@ -37,7 +37,8 @@ function cli_printMessage { # Reduce paths inside output messages. The main purpose for this # is to free horizontal space in output messages. - MESSAGE=$(echo "$MESSAGE" | sed -r 's!/home/centos/artwork/trunk/!trunk/!') + MESSAGE=$(echo "$MESSAGE" \ + | sed -r 's!/home/centos/artwork/(trunk|branches|tags)/!\1/!') # Remove blank spaces from lines' begining. MESSAGE=$(echo "$MESSAGE" | sed -r 's!^[[:space:]]+!!')