diff --git a/Scripts/Functions/Render/render.sh b/Scripts/Functions/Render/render.sh index 6f66679..419aa6e 100644 --- a/Scripts/Functions/Render/render.sh +++ b/Scripts/Functions/Render/render.sh @@ -72,11 +72,6 @@ function render { # only non-option arguments remain in it. eval set -- "$ARGUMENTS" - # Define action name. No matter what option be passed to - # centos-art, there is only one action to perform (i.e., the - # base-rendition flow). - ACTIONNAM="${FUNCNAME}_doBaseActions" - # Define action value. We use non-option arguments to define the # action value (ACTIONVAL) variable. for ACTIONVAL in "$@";do @@ -86,21 +81,22 @@ function render { # copy. cli_checkRepoDirSource - # Define the renderable top directory structure. This is, the - # place where renderable directory structures are stored. - # Directory structures outside this directory won't be - # processed. - if [[ ! $ACTIONVAL =~ "^$(cli_getRepoTLDir)/(Identity/Images|$(cli_getPathComponent '--theme-pattern'))" ]];then - cli_printMessage "`gettext "The path provided doesn't support rendition."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' - fi - # Syncronize changes between repository and working copy. At # this point, changes in the repository are merged in the # working copy and changes in the working copy committed up to # repository. cli_syncroRepoChanges + # Define action name using action value as reference. + if [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/Identity/Images/Themes" ]];then + ACTIONNAM="${FUNCNAME}_doThemeActions" + elif [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/Identity/Images" ]];then + ACTIONNAM="${FUNCNAME}_doBaseActions" + else + cli_printMessage "`gettext "The path provided doesn't support rendition."`" 'AsErrorLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + fi + # Execute action name. if [[ $ACTIONNAM =~ "^${FUNCNAM}_[A-Za-z]+$" ]];then eval $ACTIONNAM diff --git a/Scripts/Functions/Render/render_doBaseActions.sh b/Scripts/Functions/Render/render_doBaseActions.sh index 04588e0..9a35c82 100755 --- a/Scripts/Functions/Render/render_doBaseActions.sh +++ b/Scripts/Functions/Render/render_doBaseActions.sh @@ -51,7 +51,7 @@ function render_doBaseActions { local -a LASTACTIONS # Verify default directory where design models are stored in. - cli_checkFiles "$(cli_getRepoTLDir)/Identity/Themes/Models/${FLAG_THEME_MODEL}" 'd' + cli_checkFiles "$(cli_getRepoTLDir)/Identity/Models/Themes/${FLAG_THEME_MODEL}" 'd' # Define the extension pattern for template files. This is the # file extensions that centos-art will look for in order to build @@ -103,7 +103,7 @@ function render_doBaseActions { # Define final location of translation file. TRANSLATION=$(dirname $FILE \ - | sed -r 's!trunk/Identity/(Models|Themes/Models)!trunk/Locales/Identity/\1!')/$(cli_getCurrentLocale)/messages.po + | sed -r 's!trunk/Identity/(.+)!trunk/Locales/Identity/\1!')/$(cli_getCurrentLocale)/messages.po # Print final location of translation file. if [[ ! -f "$TRANSLATION" ]];then @@ -132,11 +132,11 @@ function render_doBaseActions { # path string. The common point is the name of the parent # directory (stored in PARENTDIR). # - # Identity/Themes/Models/.../Firstboot/3/splash-small.svg + # Identity/Models/Themes/.../Firstboot/3/splash-small.svg # -------------------------^| the |^------------^ # variable path | common | common path # -------------------------v| point | v------------v - # Identity/Themes/Motifs/.../Firstboot/Img/3/splash-small.png + # Identity/Images/Themes/.../Firstboot/Img/3/splash-small.png # # What we do here is remove the varibale path, the common # point, and the file extension parts in the string holding diff --git a/Scripts/Functions/Render/render_doDm.sh b/Scripts/Functions/Render/render_doDm.sh index b1b5a8b..c425178 100755 --- a/Scripts/Functions/Render/render_doDm.sh +++ b/Scripts/Functions/Render/render_doDm.sh @@ -86,7 +86,7 @@ function render_doDm { SRC[2]=${OUTPUT}/screenshot.png SRC[3]=$(dirname $TEMPLATE)/GdmGreeterTheme.xml SRC[4]=$(dirname $TEMPLATE)/GdmGreeterTheme.desktop - SRC[5]=$(cli_getRepoTLDir)/Identity/Themes/Motifs/$(cli_getPathComponent '--theme')/Backgrounds/Img/Png + SRC[5]=$(cli_getRepoTLDir)/Identity/Images/Themes/$(cli_getPathComponent '--theme')/Backgrounds/Img/Png SRC[6]=$(dirname $TEMPLATE)/icon-language.png SRC[7]=$(dirname $TEMPLATE)/icon-reboot.png SRC[8]=$(dirname $TEMPLATE)/icon-session.png diff --git a/Scripts/Functions/Render/render_doGrub.sh b/Scripts/Functions/Render/render_doGrub.sh index d2c7bf2..d0defa7 100644 --- a/Scripts/Functions/Render/render_doGrub.sh +++ b/Scripts/Functions/Render/render_doGrub.sh @@ -57,7 +57,7 @@ function render_doGrub { fi # Define theme-specific palettes directory. - local PALETTES=$(cli_getRepoTLDir)/Identity/Themes/Motifs/$(cli_getPathComponent '--theme')/Palettes + local PALETTES=$(cli_getRepoTLDir)/Identity/Images/Themes/$(cli_getPathComponent '--theme')/Palettes # Define absolute path to GPL palette. This palettes should have # 14 colors only. For more information on this see the GRUB's diff --git a/Scripts/Functions/Render/render_doSyslinux.sh b/Scripts/Functions/Render/render_doSyslinux.sh index 33101ca..2137a71 100755 --- a/Scripts/Functions/Render/render_doSyslinux.sh +++ b/Scripts/Functions/Render/render_doSyslinux.sh @@ -105,7 +105,7 @@ function render_doSyslinux { fi # Define theme-specific palettes directory. - local PALETTES=$(cli_getRepoTLDir)/Identity/Themes/Motifs/$(cli_getPathComponent '--theme')/Palettes + local PALETTES=$(cli_getRepoTLDir)/Identity/Images/Themes/$(cli_getPathComponent '--theme')/Palettes # Define absolute path to GPL palette. The GPL palette defines the # color information used to build syslinux images. This palette diff --git a/Scripts/Functions/Render/render_getDirOutput.sh b/Scripts/Functions/Render/render_getDirOutput.sh index db0a578..63d9edb 100644 --- a/Scripts/Functions/Render/render_getDirOutput.sh +++ b/Scripts/Functions/Render/render_getDirOutput.sh @@ -29,7 +29,7 @@ function render_getDirOutput { # Define base output directory using design model path as # reference. OUTPUT=$(dirname $FILE | sed -r \ - -e "s!/Models/${FLAG_THEME_MODEL}!/Motifs/$(cli_getPathComponent "$ACTIONVAL" "--theme")!" \ + -e "s!/Themes/${FLAG_THEME_MODEL}!/Themes/$(cli_getPathComponent "$ACTIONVAL" "--theme")!" \ -e "s!/Models!/Images!" \ -e "s!/Tpl!!") diff --git a/Scripts/Functions/Render/render_getDirTemplate.sh b/Scripts/Functions/Render/render_getDirTemplate.sh index aed06eb..b50761e 100644 --- a/Scripts/Functions/Render/render_getDirTemplate.sh +++ b/Scripts/Functions/Render/render_getDirTemplate.sh @@ -3,36 +3,29 @@ # render_getDirTemplate.sh -- This function defines the way renderable # directories are processed inside the repository. Inside the # repository, renderable directories are processed either through -# general-purpose rendition or theme-specific rendition. +# direct or theme-specific rendition. # -# General-purpose rendition: +# Direct rendition takes one XML file from design model +# (`trunk/Identity/Models') directory structure and produces one file +# in `trunk/Identity/Images' directory strucutre. In this +# configuration, the organization used to stored the design model is +# taken as reference to build the path required to store the image +# related to it under `trunk/Identity/Images' directory structure. # -# The general-purpose rendition takes one XML file from design -# model (`trunk/Identity/Models') directory structure and -# produces one file in `trunk/Identity/Images' directory -# strucutre. In this configuration, the organization used to -# stored the design model is taken as reference to build the -# path required to store the image related to it under -# `trunk/Identity/Images' directory structure. -# -# Theme-specific rendition: -# -# The theme-specific rendition takes one design model from -# `trunk/Identity/Models/Themes' directory structure to produce -# one or more images in -# `trunk/Identity/Motifs/$THEME/$VERSION/$MODEL' directory -# structure. In this configuration we have many different -# artistic motifs that use one unique design model directory -# structure as reference to produce images. +# Theme-specific rendition takes one design model from +# `trunk/Identity/Models/Themes' directory structure to produce one or +# more images in `trunk/Identity/Images/Themes/$THEME/$VERSION/$MODEL' +# directory structure. In this configuration we have many different +# artistic motifs that use one unique design model directory structure +# as reference to produce images. # # Since theme design models are unified to be reused by more # than one artistic motif, it is not possible to render artistic -# motifs in a lineal manner (i.e., as we do with general-purpose -# rendition) because we need to establish the relation between -# the artistic motif renderable directory structure and the -# design model first and that relation happens when renderable -# directory structures inside artistic motifs are processed -# individually. +# motifs in a lineal manner (i.e., as we do with direct rendition) +# because we need to establish the relation between the artistic motif +# renderable directory structure and the design model first and that +# relation happens when renderable directory structures inside +# artistic motifs are processed individually. # # In the first rendition category, we use a design model directory # structure as reference to produce images one by one. In the second @@ -73,16 +66,14 @@ function render_getDirTemplate { # structure. TEMPLATE=$(echo "$TEMPLATE" | sed "s!/branches/!/trunk/!") - # Define absolute path to theme-specific design models. + # Define absolute path to input files using absolute path from + # output files. if [[ -d ${TEMPLATE}/Tpl ]];then TEMPLATE=${TEMPLATE}/Tpl else - TEMPLATE=$(echo "$TEMPLATE" \ - | sed -r "s!$(cli_getPathComponent $TEMPLATE '--theme-pattern')!Identity/Themes/Models/${FLAG_THEME_MODEL}/!") + TEMPLATE=$(echo "$TEMPLATE" | sed -r \ + -e "s!/Themes/$(cli_getPathComponent "$ACTIONVAL" "--theme")!/Themes/${FLAG_THEME_MODEL}!" \ + -e "s!/Images!/Models!") fi - - # Define absolute path to general-purpose design models. - TEMPLATE=$(echo "$TEMPLATE" | sed "s!/Images!/Models!") - }