|
|
4c79b5 |
#!/bin/bash
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
# brandAnaconda - Anaconda branding script.
|
|
|
4c79b5 |
#
|
|
|
c28d1b |
# Copyright (C) 2009-2011 Alain Reguera Delgado
|
|
|
4c79b5 |
#
|
|
|
7cd8e9 |
# This program is free software; you can redistribute it and/or
|
|
|
7cd8e9 |
|
|
|
7cd8e9 |
|
|
|
7cd8e9 |
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# General Public License for more details.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# along with this program; if not, write to the Free Software
|
|
|
4c79b5 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
4c79b5 |
# USA.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
# ----------------------------------------------------------------------
|
|
|
418249 |
# $Id$
|
|
|
4c79b5 |
# ----------------------------------------------------------------------
|
|
|
4c79b5 |
|
|
|
4c79b5 |
function brandAnaconda {
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# Define file's source and target.
|
|
|
fe1b62 |
local ARTDIR=~/artwork/trunk/Identity/Themes/$(cli_getPathComponent '--theme')/Distro/Anaconda
|
|
|
4c79b5 |
local PIXMAP=/usr/share/anaconda/pixmaps
|
|
|
4c79b5 |
local SOURCE=''
|
|
|
4c79b5 |
local TARGET=''
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# Define list of files used as base to determine which files may
|
|
|
4c79b5 |
# need to be updated. Remove target from file path. Do not use
|
|
|
4c79b5 |
# basename command. We may need the directory structure (if any)
|
|
|
4c79b5 |
# under target, for further evaluation.
|
|
|
4c79b5 |
local FILES=$(find ${PIXMAP}/ | sort | uniq | sed "s!${PIXMAP}/!!g")
|
|
|
4c79b5 |
local FILE=''
|
|
|
4c79b5 |
|
|
|
4c79b5 |
for FILE in $FILES;do
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
case $FILE in
|
|
|
4c79b5 |
anaconda_header.png )
|
|
|
4c79b5 |
SOURCE=$ARTDIR/Header/Img/$MAJOR_RELEASE/$FILE
|
|
|
4c79b5 |
TARGET=$PIXMAP/$FILE
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
progress_first*.png | first*.png )
|
|
|
4c79b5 |
SOURCE=$ARTDIR/Progress/Img/$MAJOR_RELEASE/$FILE
|
|
|
4c79b5 |
TARGET=$PIXMAP/$FILE
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
rnotes | rnotes/?? | rnotes/??_?? )
|
|
|
4c79b5 |
continue
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
rnotes/??-*.png )
|
|
|
4c79b5 |
FILE=$(basename $FILE | sed -r 's!-centos[0-9]+!!')
|
|
|
4c79b5 |
SOURCE=$ARTDIR/Progress/Img/$MAJOR_RELEASE/en/$FILE
|
|
|
4c79b5 |
TARGET=$PIXMAP/rnotes/$FILE
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
rnotes/*/??-*.png )
|
|
|
4c79b5 |
LANGUAGE=$(echo $FILE | sed -r 's!rnotes/(.+)/.*!\1!')
|
|
|
4c79b5 |
FILE=$(basename $FILE | sed -r 's!-centos[0-9]+!!')
|
|
|
4c79b5 |
SOURCE=$ARTDIR/Progress/Img/$MAJOR_RELEASE/$LANGUAGE/$FILE
|
|
|
4c79b5 |
TARGET=$PIXMAP/rnotes/$LANGUAGE/$FILE
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
splash.png )
|
|
|
4c79b5 |
SOURCE=$ARTDIR/Splash/Img/$MAJOR_RELEASE/$FILE
|
|
|
4c79b5 |
TARGET=$PIXMAP/$FILE
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
syslinux-splash.png )
|
|
|
4c79b5 |
TARGET=$PIXMAP/$FILE
|
|
|
4c79b5 |
FILE=$(echo $FILE | sed -r 's!\.png$!-16c.png!')
|
|
|
4c79b5 |
SOURCE=$ARTDIR/Prompt/Img/$MAJOR_RELEASE/$FILE
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
* )
|
|
|
4c79b5 |
TARGET=$PIXMAP/$FILE
|
|
|
4c79b5 |
SOURCE=$ARTDIR/$FILE
|
|
|
4c79b5 |
esac
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# source it is not updated on target. Go to next file in the
|
|
|
4c79b5 |
# loop and check again. Only file names on source that match
|
|
|
4c79b5 |
|
|
|
4c79b5 |
cli_checkFiles "$SOURCE"
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
cli_printMessage "$TARGET" "AsUpdatingLine"
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
done
|
|
|
4c79b5 |
}
|