|
|
4c79b5 |
#!/bin/bash
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
# brandFirstboot - Firstboot 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 brandFirstboot {
|
|
|
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/firstboot/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 |
|
|
|
4c79b5 |
splash-small.png )
|
|
|
4c79b5 |
SOURCE=$ARTDIR/Firstboot/Img/$MAJOR_RELEASE/$FILE
|
|
|
4c79b5 |
TARGET=$PIXMAP/$FILE
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
firstboot-left.png )
|
|
|
4c79b5 |
SOURCE=$ARTDIR/Firstboot/Img/$FILE
|
|
|
4c79b5 |
TARGET=$PIXMAP/$FILE
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
* )
|
|
|
4c79b5 |
SOURCE=$ARTDIR/Firstboot/Img/$FILE
|
|
|
4c79b5 |
TARGET=$PIXMAP/$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 |
}
|