From b5a0248e1a3ed4403e4ae1d0d53c3421651f5537 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Feb 15 2011 20:06:11 +0000 Subject: Update distribution pre-rendition configuration directory structure to remove old scripts no longer used (but still need to be implemented in somehow different way, a more up to date way). --- diff --git a/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/brand.sh b/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/brand.sh deleted file mode 100755 index f523688..0000000 --- a/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/brand.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# -# CentOS distribution branding script. -# -# Copyright (C) 2009-2011 Alain Reguera Delgado -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# ---------------------------------------------------------------------- -# $Id$ -# ---------------------------------------------------------------------- - -# Initialize functions. -. ~/artwork/trunk/Scripts/Bash/initFunctions.sh - -# Define environment variables that should be available inside all -# functions loaded previously. -MAJOR_RELEASE=$(getRelease | cut -d. -f1) - -# Execute branding actions. -brandAnaconda -brandFirstboot diff --git a/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/rebrand-icon-themes.sh b/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/rebrand-icon-themes.sh deleted file mode 100755 index 9144bed..0000000 --- a/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/rebrand-icon-themes.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/bash -# -# Rebrand CentOS Icons in your local system using images from your -# working copy of the CentOS Artwork Repository. Run this script (as -# root) if you want to see how CentOS Icons, inside CentOS Artwork -# Repository, look in your system. -# -# Copyright (C) 2009-2011 Alain Reguera Delgado -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# ---------------------------------------------------------------------- -# $Id$ -# ---------------------------------------------------------------------- - -# Check user id. -if [ $UID -ne 0 ];then - cli_printMessage "`gettext "You need to run this script as root user."`" - exit -fi - -SRC_LOGOS=~/artwork/trunk/Identity/Brands -WORKPLACE=$(pwd) -TRG='/usr/share/icons' - -# Define file names which should contain the CentOS Brand, in this -# specific case the CentOS Symbol. Take care with the order in which -# you put files! Put more specific files first. -FILES='redhat-icon-panel-menu - redhat-starthere - gnome-starthere - start-here - kmenu' - -for FILE in $FILES;do - - # Hold FILE's location. - LOCATIONS=$(find $TRG/{Bluecurve,crystalsvg}/* \ - -regextype posix-egrep \ - -regex ".*/$FILE\.png") - - # Process each FILE location. - for LOCATION in $LOCATIONS;do - - # Define FILE width. - WIDTH=$(echo $LOCATION | cut -d/ -f6 | cut -dx -f1) - - # Define the appropriate source image. - ICON=$SRC_LOGOS/Img/centos/symbol/5c-a/violet/$WIDTH.png - - # If ICON doesn't exist go to Logos section, render it, come - # back here and continue. - if [ ! -f $ICON ];then - cd $SRC_LOGOS - ./render.sh centos/symbol/5c-a/violet/$WIDTH - cd $WORKPLACE - fi - - # Rebrand LOCATION with the appropriate source image. - if [ -f $LOCATION ] || [ -h $LOCATION ];then - /bin/cp --remove-destination \ - --verbose \ - -Z system_u:object_r:usr_t \ - $ICON $LOCATION - fi - done -done - -# TEMPLATE Files. -cp -v $SRC_LOGOS/Tpl/centos/symbols/kmenu.svgz \ - /usr/share/icons/crystalsvg/scalable/apps/kmenu.svgz - diff --git a/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/rebrand-logos.sh b/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/rebrand-logos.sh deleted file mode 100755 index bc05775..0000000 --- a/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/rebrand-logos.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash -# -# Rebrand CentOS Logos in your local system using images from your -# working copy of the CentOS Artwork Repository. Run this script (as -# root) if you want to see how CentOS Icons, inside CentOS Artwork -# Repository, look in your system. -# -# Copyright (C) 2009-2011 Alain Reguera Delgado -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# ---------------------------------------------------------------------- -# Scripts > Identity > Themes > Distro -# ---------------------------------------------------------------------- - -# Check user id. -if [ $UID -ne 0 ];then - cli_printMessage "`gettext "You need to run this script as root user."`" - exit -fi - -SRC_LOGOS=~/artwork/trunk/Identity/Brands -WORKPLACE=$(pwd) -TRG=/usr/share/pixmaps/redhat - -# Actually, images related to CentOS Logos are contained in files that -# begin its filename with the word `redhat'. We use that pattern here -# to rebrand the images with the appropriate CentOS information. -for FILE in $TRG/redhat*;do - - # If FILE is a symbolic link continue. - if [ -h $FILE ];then - continue; - fi - - # Get image properties. There are images that doesn't have the - # width on the filename so we used the identify utility to get - # it and other image properties. - PROP=`identify $FILE` - - # Define image name. - NAME=$(basename $FILE) - - # Define image width. - WIDTH=`echo $PROP | cut -d' ' -f3 | cut -dx -f1` - - # Check if image specifies emboss in its name. If so, consider it - # as an emboss effect applied to the image an use the appropriate - # emboss source for it. - echo $NAME | grep emboss >> /dev/null - if [ $? -eq 0 ];then - EFFECT='-emboss' - else - EFFECT= - fi - - # Define image format. We use only three characters in the image - # extension. - FORMAT=`echo $PROP \ - | cut -d' ' -f2 \ - | tr '[:upper:]' '[:lower:]' \ - | sed -r 's!^([a-z]{3}).*!\1!'` - - # Define the appropriate source image. This is the source image we - # use to rebrand. - LOGO=$SRC_LOGOS/Img/centos/horizontal/5c-a/violet/${WIDTH}${EFFECT}.${FORMAT} - - # If LOGO doesn't exist go to Logos section, render it, come - # back here and continue. - if [ ! -f $LOGO ];then - cd $SRC_LOGOS - ./render.sh centos/horizontal/5c-a/violet/$WIDTH - cd $WORKPLACE - fi - - # Rebrand FILE with the appropriate CentOS Logo image. - if [ -f $LOCATION ] || [ -h $LOCATION ];then - /bin/cp --remove-destination \ - --verbose \ - -Z system_u:object_r:usr_t \ - $LOGO $FILE - fi -done - -# Copy gnome-startup.png image. This image have no source inside Logos -# section. The original verison was copied from the distribution and -# rebranded using GIMP. After that I put it on inside Logos/Img/ to be -# used as source image on rebranding. -cp $SRC_LOGOS/Img/gnome-startup.png $TRG/ diff --git a/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/rebrand-symbols.sh b/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/rebrand-symbols.sh deleted file mode 100755 index 20c4662..0000000 --- a/Scripts/Bash/Functions/Render/Config/Identity/Themes/Distro/rebrand-symbols.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash -# -# Rebrand CentOS Symbol in your local system using images from your -# working copy of the CentOS Artwork Repository. Run this script (as -# root) if you want to see how CentOS Symbols inside CentOS Artwork -# Repository look in your system. -# -# Copyright (C) 2009-2011 Alain Reguera Delgado -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# ---------------------------------------------------------------------- -# $Id$ -# ---------------------------------------------------------------------- - -# Check user id. -if [ $UID -ne 0 ];then - cli_printMessage "`gettext "You need to run this script as root user."`" - exit -fi - -SRC_SYMBOLS=~/artwork/trunk/Identity/Brands -WORKPLACE=$(pwd) -TRG=/usr/share/pixmaps/redhat - -# Actually, images related to CentOS Symbol are contained in files -# that begin its filename with the words `shadowman', and `rpm'. We -# use that pattern here to rebrand the images with the appropriate -# CentOS information. -for FILE in $TRG/{shadowman,rpm}*;do - - # If FILE is a symbolic link continue. - if [ -h $FILE ];then - continue; - fi - - # Get image properties. There are images that doesn't have the - # width on the filename so we use the identify utility to get it - # and other image properties. - PROP=`identify $FILE` - - # Define image name. - NAME=$(basename $FILE) - - # Define image width. - WIDTH=`echo $PROP | cut -d' ' -f3 | cut -dx -f1` - - # Define image format. We are using only three characters in the - # image extension. - FORMAT=`echo $PROP \ - | cut -d' ' -f2 \ - | tr '[:upper:]' '[:lower:]' \ - | sed -r 's!^([a-z]{3}).*!\1!'` - - # Define the appropriate source image. This is the source image we - # use to rebrand. - SYMBOL=$SRC_SYMBOLS/Img/centos/symbol/5c-a/violet/${WIDTH}.${FORMAT} - - # If SYMBOL doesn't exist go to Logos section, render it, come - # back here and continue. - if [ ! -f $SYMBOL ];then - cd $SRC_SYMBOLS - ./render.sh centos/symbols/5c-a/violet/$WIDTH - cd $WORKPLACE - fi - - # Rebrand FILE with CentOS Symbol - if [ -f $LOCATION ] || [ -h $LOCATION ]; then - /bin/cp --remove-destination \ - --verbose \ - -Z system_u:object_r:usr_t \ - $SYMBOL $FILE - fi -done