| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function render_doIdentityImageDm { |
| |
| local -a SRC |
| local -a DST |
| local -a COMMANDS |
| local DM='' |
| local TGZ='' |
| local COUNT=0 |
| local RESOLUTION='' |
| local RESOLUTIONS='' |
| |
| |
| |
| DM=$(render_getIdentityConfigOption "$1" '2') |
| |
| |
| |
| |
| |
| |
| DM=$(echo $DM | tr '[:lower:]' '[:upper:]') |
| |
| |
| |
| RESOLUTIONS=$(render_getIdentityConfigOption "$1" '3') |
| |
| |
| |
| if [[ "$RESOLUTIONS" == '' ]];then |
| cli_printMessage "`gettext "There is no resolution information to process."`" 'AsErrorLine' |
| cli_printMessage $(caller) "AsToKnowMoreLine" |
| fi |
| |
| |
| SRC[0]=$(cli_getRepoTLDir)/Identity/Brands/Img/CentOS/Symbol/5c-a/48.png |
| SRC[1]=${DIRNAME}/release.png |
| SRC[2]=${DIRNAME}/screenshot.png |
| SRC[3]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/BootUp/${DM}/GdmGreeterTheme.xml |
| SRC[4]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/BootUp/${DM}/GdmGreeterTheme.desktop |
| SRC[5]=$(cli_getRepoTLDir)/Identity/Themes/Motifs/$(cli_getPathComponent '--theme')/Backgrounds/Img/Png |
| SRC[6]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/BootUp/${DM}/icon-language.png |
| SRC[7]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/BootUp/${DM}/icon-reboot.png |
| SRC[8]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/BootUp/${DM}/icon-session.png |
| SRC[9]=$(cli_getRepoTLDir)/Identity/Themes/Models/${THEMEMODEL}/Distro/BootUp/${DM}/icon-shutdown.png |
| |
| |
| TGZ=$(cli_getPathComponent '--theme-name') |
| |
| |
| DST[0]=${TGZ}/centos-symbol.png |
| DST[1]=${TGZ}/centos-release.png |
| DST[2]=${TGZ}/screenshot.png |
| DST[3]=${TGZ}/${TGZ}.xml |
| DST[4]=${TGZ}/GdmGreeterTheme.desktop |
| DST[5]=${TGZ}/background.png |
| DST[6]=${TGZ}/icon-language.png |
| DST[7]=${TGZ}/icon-reboot.png |
| DST[8]=${TGZ}/icon-session.png |
| DST[9]=${TGZ}/icon-shutdown.png |
| |
| |
| pushd $DIRNAME > /dev/null |
| |
| |
| if [[ ! -d ${TGZ} ]];then |
| mkdir ${TGZ} |
| fi |
| |
| for RESOLUTION in $RESOLUTIONS;do |
| |
| while [[ $COUNT -lt ${#SRC[*]} ]];do |
| |
| if [[ $COUNT -eq 5 ]];then |
| |
| |
| |
| SRC[$COUNT]=$(echo "${SRC[$COUNT]}" | cut -d/ -f-13)/${RESOLUTION}-final.png |
| |
| |
| |
| |
| |
| |
| if [[ ! -f ${SRC[$COUNT]} ]];then |
| continue 2 |
| fi |
| |
| elif [[ $COUNT =~ '^[6-9]$' ]];then |
| |
| |
| |
| |
| if [[ $DM =~ '^KDM$' ]];then |
| COUNT=$(($COUNT + 1)) |
| continue |
| fi |
| |
| fi |
| |
| |
| cli_checkFiles ${SRC[$COUNT]} |
| |
| |
| cp ${SRC[$COUNT]} ${DST[$COUNT]} |
| |
| |
| |
| if [[ $COUNT =~ '^(3|4)$' ]];then |
| render_doIdentityTMarkersCommons "${DST[$COUNT]}" |
| fi |
| |
| |
| COUNT=$(($COUNT + 1)) |
| |
| done |
| |
| |
| COUNT=0 |
| |
| cli_printMessage "${DIRNAME}/${RESOLUTION}.tar.gz" "AsCreatingLine" |
| |
| |
| tar -czf "${RESOLUTION}.tar.gz" $TGZ |
| |
| done |
| |
| |
| |
| rm -r $TGZ |
| |
| |
| cli_printMessage "${SRC[1]}" "AsDeletingLine" |
| rm ${SRC[1]} |
| cli_printMessage "${SRC[2]}" "AsDeletingLine" |
| rm ${SRC[2]} |
| |
| |
| popd > /dev/null |
| |
| |
| cli_printMessage '-' 'AsSeparatorLine' |
| |
| } |