@@ -0,0 +1,111 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# render_doCopy.sh -- This function duplicates rendition stuff.
|
4
|
+
# Rendition stuff is formed by design models, design images,
|
5
|
+
# pre-rendition configuration scripts and translations files. This
|
6
|
+
# way, when we say to duplicate rendition stuff we are saying to
|
7
|
+
# duplicate these four directory structures (i.e., design models,
|
8
|
+
# design images, pre-rendition configuration scripts, and related
|
9
|
+
# translations files).
|
10
|
+
#
|
11
|
+
# Copyright (C) 2009-2011 Alain Reguera Delgado
|
12
|
+
#
|
13
|
+
# This program is free software; you can redistribute it and/or
|
14
|
+
# modify it under the terms of the GNU General Public License as
|
15
|
+
# published by the Free Software Foundation; either version 2 of the
|
16
|
+
# License, or (at your option) any later version.
|
17
|
+
#
|
18
|
+
# This program is distributed in the hope that it will be useful, but
|
19
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
21
|
+
# General Public License for more details.
|
22
|
+
#
|
23
|
+
# You should have received a copy of the GNU General Public License
|
24
|
+
# along with this program; if not, write to the Free Software
|
25
|
+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
26
|
+
# USA.
|
27
|
+
#
|
28
|
+
# ----------------------------------------------------------------------
|
29
|
+
# $Id$
|
30
|
+
# ----------------------------------------------------------------------
|
31
|
+
|
32
|
+
function render_doCopy {
|
33
|
+
|
34
|
+
# Verify target directory.
|
35
|
+
cli_checkRepoDirTarget
|
36
|
+
|
37
|
+
# Determine what directory structure we are duplicating. When we
|
38
|
+
# duplicate directories, inside `trunk/Identity' directory
|
39
|
+
# structure, there are two organizational designs we need to be
|
40
|
+
# aware of:
|
41
|
+
#
|
42
|
+
# Organization 1: Design models (`Tpl/') and design images
|
43
|
+
# (`Img/') directories share a common parent directory under
|
44
|
+
# `trunk/Identity' directory structure.
|
45
|
+
#
|
46
|
+
# trunk/Identity/Widgets
|
47
|
+
# |-- Tpl
|
48
|
+
# | `-- file.svg
|
49
|
+
# `-- Img
|
50
|
+
# `-- file.png
|
51
|
+
#
|
52
|
+
# trunk/Translations/Identity/Widgets
|
53
|
+
# trunk/Scripts/Bash/Functions/Render/Config/Identity/Widgets
|
54
|
+
#
|
55
|
+
# Organization 2: Design models and design images don't share a
|
56
|
+
# common parent directory. Instead, design models and design
|
57
|
+
# images are stored directly on their own directory structures
|
58
|
+
# under `trunk/Identity'.
|
59
|
+
#
|
60
|
+
# trunk/Identity/Themes/Models/Default/Distro/
|
61
|
+
# `-- Anaconda
|
62
|
+
# `-- Header
|
63
|
+
# `-- anaconda_header.svg
|
64
|
+
#
|
65
|
+
# trunk/Identity/Themes/Motifs/TreeFlower/Distro/
|
66
|
+
# `-- Anaconda
|
67
|
+
# `-- Header
|
68
|
+
# `-- anaconda_header.png
|
69
|
+
#
|
70
|
+
# trunk/Translations/Identity/Themes/Distro/Anaconda/Header/
|
71
|
+
# trunk/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/Anaconda/Header/
|
72
|
+
#
|
73
|
+
# Another consideration to have, when we duplicate a directory
|
74
|
+
# structures, is the source location used to perform the
|
75
|
+
# duplication action. The source location is relevant to determine
|
76
|
+
# the related directory structures (parallel directories) so they
|
77
|
+
# be copied too (otherwise they may get orphaned and rendition
|
78
|
+
# behaviour may not work due the fault of required information).
|
79
|
+
#
|
80
|
+
# In order for a renderable directory estructure to be valid, the
|
81
|
+
# directory structure should match the following conditions:
|
82
|
+
#
|
83
|
+
# 1. To have a unique directory structure under
|
84
|
+
# `trunk/Identity', organized by any one of the above
|
85
|
+
# organizational designs above.
|
86
|
+
#
|
87
|
+
# 2. To have a unique directory structure under
|
88
|
+
# `trunk/Translations' to store translation files.
|
89
|
+
#
|
90
|
+
# 3. To have a unique directory structure under
|
91
|
+
# `trunk/Scripts/Bash/Functions/Render/Config' to set
|
92
|
+
# pre-rendition configuration script.
|
93
|
+
#
|
94
|
+
# As convenction, the render_doCopy function uses `trunk/Identity'
|
95
|
+
# directory structure as source location. Once the
|
96
|
+
# `trunk/Identity' directory structure has been specified, the
|
97
|
+
# related path information is built from it and copied
|
98
|
+
# automatically.
|
99
|
+
#
|
100
|
+
# Notice that the duplication process is done from
|
101
|
+
# `trunk/Identity' on, not the oposite. If you try to duplicate a
|
102
|
+
# translation structure, the `trunk/Identity' for that translation
|
103
|
+
# is not created. This limitation is impossed by the fact that
|
104
|
+
# many `trunk/Identity' directory structures may reuse the same
|
105
|
+
# translation directory structure. Likewise, one translation
|
106
|
+
# directory structure cannot be deleted while a related
|
107
|
+
# `trunk/Identity/' directory structure still exist. This same
|
108
|
+
# concept applies to others auxiliar directory structures like
|
109
|
+
# pre-rendition configuration scripts.
|
110
|
+
|
111
|
+
}
|