643925 Update render_doIdentityImageDm.sh.

Authored and Committed by areguera 13 years ago
Scripts/Bash/Functions/Render/render_doIdentityImageDm.sh CHANGED
@@ -3,7 +3,7 @@
3
3
# render_doIdentityImageDm.sh -- This function collects Display
4
4
# Manager (DM) required files and creates a tar.gz package that groups
5
5
# them all together. Use this function as last-rendition action for
6
- # GDM and KDM base-rendition actions.
6
+ # Gdm and Kdm base-rendition actions.
7
7
#
8
8
# Usage:
9
9
#
@@ -12,7 +12,7 @@
12
12
#
13
13
# Where:
14
14
#
15
- # TYPE can be either `GDM' or `KDM'. These values correspond to the
15
+ # TYPE can be either `Gdm' or `Kdm'. These values correspond to the
16
16
# directory names used to store related design models.
17
17
#
18
18
# RESOLUTION represents the screen resolution tar.gz files are
@@ -51,7 +51,6 @@ function render_doIdentityImageDm {
51
51
52
52
local -a SRC
53
53
local -a DST
54
- local -a COMMANDS
55
54
local DM=''
56
55
local TGZ=''
57
56
local COUNT=0
@@ -61,13 +60,13 @@ function render_doIdentityImageDm {
61
60
# Get display manager passed from render.conf.sh pre-rendition
62
61
# configuration script.
63
62
DM=$(render_getIdentityConfigOption "$1" '2')
64
-
63
+
65
64
# Sanitate display manager passed from render.conf.sh
66
65
# pre-rendition configuration script. Whatever value be retrived
67
66
# as display manager configuration option is converted to
68
- # uppercase in order to match either GDM or KDM design model
67
+ # uppercase in order to match either Gdm or Kdm design model
69
68
# directory structures.
70
- DM=$(echo $DM | tr '[:lower:]' '[:upper:]')
69
+ DM=$(cli_getRepoName "$DM" 'd')
71
70
72
71
# Get screen resolutions passed from render.conf.sh pre-rendition
73
72
# configuration script.
@@ -82,15 +81,15 @@ function render_doIdentityImageDm {
82
81
83
82
# Define source files using absolute paths.
84
83
SRC[0]=$(cli_getRepoTLDir)/Identity/Brands/Img/Symbol/48.png
85
- SRC[1]=${DIRNAME}/release.png
86
- SRC[2]=${DIRNAME}/screenshot.png
87
- SRC[3]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/BootUp/${DM}/GdmGreeterTheme.xml
88
- SRC[4]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/BootUp/${DM}/GdmGreeterTheme.desktop
84
+ SRC[1]=${OUTPUT}/release.png
85
+ SRC[2]=${OUTPUT}/screenshot.png
86
+ SRC[3]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/${DM}/GdmGreeterTheme.xml
87
+ SRC[4]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/${DM}/GdmGreeterTheme.desktop
89
88
SRC[5]=$(cli_getRepoTLDir)/Identity/Themes/Motifs/$(cli_getPathComponent '--theme')/Backgrounds/Img/Png
90
- SRC[6]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/BootUp/${DM}/icon-language.png
91
- SRC[7]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/BootUp/${DM}/icon-reboot.png
92
- SRC[8]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/BootUp/${DM}/icon-session.png
93
- SRC[9]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/BootUp/${DM}/icon-shutdown.png
89
+ SRC[6]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/${DM}/icon-language.png
90
+ SRC[7]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/${DM}/icon-reboot.png
91
+ SRC[8]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/${DM}/icon-session.png
92
+ SRC[9]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/${DM}/icon-shutdown.png
94
93
95
94
# Define name used as temporal holder to build tar.gz file.
96
95
TGZ=$(cli_getPathComponent '--theme-name')
@@ -108,7 +107,7 @@ function render_doIdentityImageDm {
108
107
DST[9]=${TGZ}/icon-shutdown.png
109
108
110
109
# Move into the working directory.
111
- pushd $DIRNAME > /dev/null
110
+ pushd ${OUTPUT} > /dev/null
112
111
113
112
# Create directory used as temporal holder to build tar.gz file.
114
113
if [[ ! -d ${TGZ} ]];then
@@ -136,10 +135,10 @@ function render_doIdentityImageDm {
136
135
137
136
elif [[ $COUNT =~ '^[6-9]$' ]];then
138
137
139
- # If display manager is KDM, then increment counter and
140
- # resume the next iteration. Icons aren't used on KDM,
138
+ # If display manager is Kdm, then increment counter and
139
+ # resume the next iteration. Icons aren't used on Kdm,
141
140
# so there's no need to have them inside it.
142
- if [[ $DM =~ '^KDM$' ]];then
141
+ if [[ $DM =~ '^Kdm$' ]];then
143
142
COUNT=$(($COUNT + 1))
144
143
continue
145
144
fi
@@ -166,7 +165,8 @@ function render_doIdentityImageDm {
166
165
# Reset counter.
167
166
COUNT=0
168
167
169
- cli_printMessage "${DIRNAME}/${RESOLUTION}.tar.gz" "AsCreatingLine"
168
+ # Print action message.
169
+ cli_printMessage "${OUTPUT}/${RESOLUTION}.tar.gz" "AsCreatingLine"
170
170
171
171
# Create tar.gz file.
172
172
tar -czf "${RESOLUTION}.tar.gz" $TGZ