From ebe7f2519a94f03da9a2b03700816669543db9dc Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jan 07 2011 19:29:38 +0000 Subject: Update render_doCopy.sh. I keep going with planification. There is nothing functional yet. --- diff --git a/Scripts/Bash/Functions/Render/render_doCopy.sh b/Scripts/Bash/Functions/Render/render_doCopy.sh index f85d4f1..4c28ed9 100755 --- a/Scripts/Bash/Functions/Render/render_doCopy.sh +++ b/Scripts/Bash/Functions/Render/render_doCopy.sh @@ -8,6 +8,160 @@ # design images, pre-rendition configuration scripts, and related # translations files). # +# When we duplicate directories, inside `trunk/Identity' directory +# structure, there are two organizational designs we need to be aware +# of: +# +# Organization 1: Design models (`Tpl/') and design images (`Img/') +# directories share a common parent directory under `trunk/Identity' +# directory structure. +# +# trunk/Identity/Widgets +# |-- Tpl +# | `-- file.svg +# `-- Img +# `-- file.png +# +# trunk/Translations/Identity/Widgets +# trunk/Scripts/Bash/Functions/Render/Config/Identity/Widgets +# +# Organization 2: Design models and design images don't share a +# common parent directory. Instead, design models and design images +# are stored separately on their own directory structures under +# `trunk/Identity'. +# +# trunk/Identity/Themes/Models/Default/Distro/ +# `-- Anaconda +# `-- Header +# `-- anaconda_header.svg +# +# trunk/Identity/Themes/Motifs/TreeFlower/Distro/ +# `-- Anaconda +# `-- Header +# `-- anaconda_header.png +# +# trunk/Translations/Identity/Themes/Distro/Anaconda/Header/ +# trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/Anaconda/Header/ +# +# The "Organization 2" emerged from "Organization 1" to satisfy a +# need that "Organization 1" cannot satisfy: The design models +# cannot be reused in "Organization 1" but in "Organization 2" they +# can be reused indeed. +# +# Another consideration to have, when we duplicate directory +# structures, is the source location used to perform the duplication +# action. The source location is relevant to determine the required +# information inside directory structures (parallel directories) that +# need to be copied too (otherwise we may end up with orphan directory +# structures unable to be rendered, due the absence of required +# information). +# +# In order for a renderable directory structure to be valid, the new +# directory structure copied should match the following conditions: +# +# 1. To have a unique directory structure under +# `trunk/Identity', organized by any one of the above +# organizational designs above. +# +# 2. To have a unique directory structure under +# `trunk/Translations' to store translation files. +# +# 3. To have a unique directory structure under +# `trunk/Scripts/Bash/Functions/Render/Config' to set +# pre-rendition configuration script. +# +# As convenction, the render_doCopy function uses `trunk/Identity' +# directory structure as source location. Once the `trunk/Identity' +# directory structure has been specified and verified, the related +# path information is built from it and copied automatically to the +# new location specified by FLAG_TO variable. +# +# Organization 1: +# +# Command: +# - centos-art render --copy=trunk/Identity/Widgets --to=trunk/Identity/NewDirName +# +# Sources: +# - trunk/Identity/Widgets +# - trunk/Translations/Identity/Widgets +# - trunk/Scripts/Bash/Functions/Render/Config/Identity/Widgets +# +# Targets: +# - trunk/Identity/NewDirName +# - trunk/Translations/Identity/NewDirName +# - trunk/Scripts/Bash/Functions/Render/Config/Identity/NewDirName +# +# Organization 2: +# +# Command: +# - centos-art render --copy=trunk/Identity/Themes/Motifs/TreeFlower \ +# --to=trunk/Identity/Themes/Motifs/NewDirName +# +# Sources: +# - trunk/Identity/Themes/Motifs/TreeFlower +# - trunk/Translations/Identity/Themes +# - trunk/Translations/Identity/Themes/Motifs/TreeFlower +# - trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes +# - trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes/Motifs/TreeFlower +# +# Targets: +# - trunk/Identity/Themes/Motifs/NewDirName +# - trunk/Translations/Identity/Themes +# - trunk/Translations/Identity/Themes/Motifs/NewDirName +# - trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes +# - trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes/Motifs/NewDirName +# +# Notice that design models are not included in source or target +# locations. This is intentional. In "Organization 2", design models +# live by their own, they just exist, they are there, available for +# any artistic motif to use. By default `Themes/Models/Default' design +# model directory structure is used, but other design models +# directory structures (under Themes/Models/) can be created and +# used changing the value of THEMEMODEL variable inside the +# pre-rendition configuration script of the artistic motif source +# location you want to produce. +# +# Notice, also, how translations and pre-rendition configuration +# scripts may both be equal in source and target. This is because +# such structures are common to all artistic motifs (the default +# values to use when no specific values are provided). +# +# - Common directory structures are not copied or deleted. We cannot +# copy a directory structure to itself. +# +# - Common directory structures represent the default value to use +# when no specific translations and/or pre-rendition configuration +# script are provided inside source location. +# +# - Specific directory structures, if present, are both copiable and +# removable. This is, when you perform a copy or delete action +# from source, that source specific auxiliar directories are +# transfered in the copy action to a new location (that specified +# by FLAG_TO variable). +# +# - When translations and/or pre-rendition configuration scripts are +# found inside the source directory structure, the centos-art.sh +# script loads common auxiliar directories first and later +# specific auxiliar directories. This way, identity rendition of +# source locations can be customized idividually over the base of +# common default values. +# +# - Specific auxiliar directories are optional. +# +# - Common auxiliar directories should be present always. This, in +# order to provide the information required by render +# functionality (i.e., to make it functional). +# +# Notice that, the duplication process is done from `trunk/Identity' +# on, not the oposite. If you try to duplicate a translation structure +# (or similar auxiliar directory structures like pre-rendition +# configuration scripts), the `trunk/Identity' for that translation is +# not created. This limitation is impossed by the fact that many +# `trunk/Identity' directory structures may reuse/share the same +# translation directory structure. We cannot delete one translation +# (or similar) directory structures while a related `trunk/Identity/' +# directory structure is still in need of it. +# # Copyright (C) 2009-2011 Alain Reguera Delgado # # This program is free software; you can redistribute it and/or @@ -34,78 +188,6 @@ function render_doCopy { # Verify target directory. cli_checkRepoDirTarget - # Determine what directory structure we are duplicating. When we - # duplicate directories, inside `trunk/Identity' directory - # structure, there are two organizational designs we need to be - # aware of: - # - # Organization 1: Design models (`Tpl/') and design images - # (`Img/') directories share a common parent directory under - # `trunk/Identity' directory structure. - # - # trunk/Identity/Widgets - # |-- Tpl - # | `-- file.svg - # `-- Img - # `-- file.png - # - # trunk/Translations/Identity/Widgets - # trunk/Scripts/Bash/Functions/Render/Config/Identity/Widgets - # - # Organization 2: Design models and design images don't share a - # common parent directory. Instead, design models and design - # images are stored directly on their own directory structures - # under `trunk/Identity'. - # - # trunk/Identity/Themes/Models/Default/Distro/ - # `-- Anaconda - # `-- Header - # `-- anaconda_header.svg - # - # trunk/Identity/Themes/Motifs/TreeFlower/Distro/ - # `-- Anaconda - # `-- Header - # `-- anaconda_header.png - # - # trunk/Translations/Identity/Themes/Distro/Anaconda/Header/ - # trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/Anaconda/Header/ - # - # Another consideration to have, when we duplicate a directory - # structures, is the source location used to perform the - # duplication action. The source location is relevant to determine - # the related directory structures (parallel directories) so they - # be copied too (otherwise they may get orphaned and rendition - # behaviour may not work due the fault of required information). - # - # In order for a renderable directory estructure to be valid, the - # directory structure should match the following conditions: - # - # 1. To have a unique directory structure under - # `trunk/Identity', organized by any one of the above - # organizational designs above. - # - # 2. To have a unique directory structure under - # `trunk/Translations' to store translation files. - # - # 3. To have a unique directory structure under - # `trunk/Scripts/Bash/Functions/Render/Config' to set - # pre-rendition configuration script. - # - # As convenction, the render_doCopy function uses `trunk/Identity' - # directory structure as source location. Once the - # `trunk/Identity' directory structure has been specified, the - # related path information is built from it and copied - # automatically. - # - # Notice that the duplication process is done from - # `trunk/Identity' on, not the oposite. If you try to duplicate a - # translation structure, the `trunk/Identity' for that translation - # is not created. This limitation is impossed by the fact that - # many `trunk/Identity' directory structures may reuse the same - # translation directory structure. Likewise, one translation - # directory structure cannot be deleted while a related - # `trunk/Identity/' directory structure still exist. This same - # concept applies to others auxiliar directory structures like - # pre-rendition configuration scripts. + # Determine what directory structure we are duplicating. }