From 33085b3b348be1ee6317043e2c3b70f5c678404f Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jun 12 2011 23:11:58 +0000 Subject: Update `trunk/Scripts/Functions': - Remove `Brands' and `Copy' functionality. A long time has passed since the last time these functionalities were updated and still they do nothing but to remaind me some of the features I would like to have implemented. - Implementation fo `Brands' and `Copy' functionalities have lower priority compared with the need of documenting The CentOS Project corporate visual identity and the way of produce it inside The CentOS Artwork Repository. - Keep yourself focused, please. (I'm talking to myself here :)) --- diff --git a/Scripts/Functions/Brand/brandAnaconda.sh b/Scripts/Functions/Brand/brandAnaconda.sh deleted file mode 100644 index 15d8939..0000000 --- a/Scripts/Functions/Brand/brandAnaconda.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/bash -# -# brandAnaconda - Anaconda branding script. -# -# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG -# -# 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., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# ---------------------------------------------------------------------- -# $Id$ -# ---------------------------------------------------------------------- - -function brandAnaconda { - - # Define file's source and target. - local ARTDIR=$(cli_getRepoTLDir $ACTIONVAL)/Identity/Images/Themes/$(cli_getPathComponent $ACTIONVAL --motif)/Distro/Anaconda - local PIXMAP=/usr/share/anaconda/pixmaps - local SOURCE='' - local TARGET='' - - # Define list of files used as base to determine which files may - # need to be updated. Remove target from file path. Do not use - # basename command. We may need the directory structure (if any) - # under target, for further evaluation. - local FILES=$(find ${PIXMAP}/ | sort | uniq | sed "s!${PIXMAP}/!!g") - local FILE='' - - for FILE in $FILES;do - - # Define which file is release-specific, and specify the correct - # path on source. - case $FILE in - anaconda_header.png ) - SOURCE=$ARTDIR/Header/Img/$MAJOR_RELEASE/$FILE - TARGET=$PIXMAP/$FILE - ;; - - progress_first*.png | first*.png ) - SOURCE=$ARTDIR/Progress/Img/$MAJOR_RELEASE/$FILE - TARGET=$PIXMAP/$FILE - ;; - - rnotes | rnotes/?? | rnotes/??_?? ) - continue - ;; - - rnotes/??-*.png ) - FILE=$(basename $FILE | sed -r 's!-centos[0-9]+!!') - SOURCE=$ARTDIR/Progress/Img/$MAJOR_RELEASE/en/$FILE - TARGET=$PIXMAP/rnotes/$FILE - ;; - - rnotes/*/??-*.png ) - LANGUAGE=$(echo $FILE | sed -r 's!rnotes/(.+)/.*!\1!') - FILE=$(basename $FILE | sed -r 's!-centos[0-9]+!!') - SOURCE=$ARTDIR/Progress/Img/$MAJOR_RELEASE/$LANGUAGE/$FILE - TARGET=$PIXMAP/rnotes/$LANGUAGE/$FILE - ;; - - splash.png ) - SOURCE=$ARTDIR/Splash/Img/$MAJOR_RELEASE/$FILE - TARGET=$PIXMAP/$FILE - ;; - - syslinux-splash.png ) - TARGET=$PIXMAP/$FILE - FILE=$(echo $FILE | sed -r 's!\.png$!-16c.png!') - SOURCE=$ARTDIR/Prompt/Img/$MAJOR_RELEASE/$FILE - ;; - - * ) - TARGET=$PIXMAP/$FILE - SOURCE=$ARTDIR/$FILE - esac - - # Check if file exists on source. If file doesn't exist on the - # source it is not updated on target. Go to next file in the - # loop and check again. Only file names on source that match - # those in target are updated. - cli_checkFiles "$SOURCE" - - # File exists and will be installed on target. - cli_printMessage "$TARGET" --as-updating-line - - # Update file. - #cp $SOURCE $TARGET - - # Set file's access rights. - #chown root:root $TARGET - #chmod 755 $TARGET - #chcon system_u:object_r:usr_t $TARGET - -done -} diff --git a/Scripts/Functions/Brand/brandFirstboot.sh b/Scripts/Functions/Brand/brandFirstboot.sh deleted file mode 100755 index 774ef06..0000000 --- a/Scripts/Functions/Brand/brandFirstboot.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash -# -# brandFirstboot - Firstboot branding script. -# -# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG -# -# 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., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# ---------------------------------------------------------------------- -# $Id$ -# ---------------------------------------------------------------------- - -function brandFirstboot { - - # Define file's source and target. - local ARTDIR=$(cli_getRepoTLDir $ACTIONVAL)/Identity/Images/Themes/$(cli_getPathComponent $ACTIONVAL --motif)/Distro/Anaconda - local PIXMAP=/usr/share/firstboot/pixmaps - local SOURCE='' - local TARGET='' - - # Define list of files used as base to determine which files may - # need to be updated. Remove target from file path. Do not use - # basename command. We may need the directory structure (if any) - # under target, for further evaluation. - local FILES=$(find ${PIXMAP}/ | sort | uniq | sed "s!${PIXMAP}/!!g") - local FILE='' - - for FILE in $FILES;do - - # Define which file is release-specific, and specify the correct - # path on source. - case $FILE in - - splash-small.png ) - SOURCE=$ARTDIR/Firstboot/Img/$MAJOR_RELEASE/$FILE - TARGET=$PIXMAP/$FILE - ;; - - firstboot-left.png ) - SOURCE=$ARTDIR/Firstboot/Img/$FILE - TARGET=$PIXMAP/$FILE - ;; - - * ) - SOURCE=$ARTDIR/Firstboot/Img/$FILE - TARGET=$PIXMAP/$FILE - esac - - # Check if file exists on source. If file doesn't exist on the - # source it is not updated on target. Go to next file in the - # loop and check again. Only file names on source that match - # those in target are updated. - cli_checkFiles "$SOURCE" - - # File exists and will be installed on target. - cli_printMessage "$TARGET" --as-updating-line - - # Update file. - #cp $SOURCE $TARGET - - # Set file's access rights. - #chown root:root $TARGET - #chmod 755 $TARGET - #chcon system_u:object_r:usr_t $TARGET - - done -} diff --git a/Scripts/Functions/Copy/copy.sh b/Scripts/Functions/Copy/copy.sh deleted file mode 100755 index 8b025d8..0000000 --- a/Scripts/Functions/Copy/copy.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/bash -# -# copy.sh -- This function copies files inside the repository and -# updates menu, nodes and cross references inside repository -# documentation manual for each file copied. -# -# When a copying action is performed inside the repository, -# centos-art.sh script verifies whether the file being copied (the -# source file) is a regular file or a directory. -# -# When a regular file is the source of copying actions, the target -# location can be anything accepted by subversion copy command. -# However, when the source location is a directory, centos-art.sh -# verifies whether that directory is empty or not. If the directory is -# empty, then it is copied to target. However, when there is one or -# more files inside, centos-art.sh loops recursively through all files -# inside that directory, builds a list of files to process and copy -# file by file to target location creating parents directories for -# target files when it be needed. -# -# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG -# -# 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., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# ---------------------------------------------------------------------- -# $Id$ -# ---------------------------------------------------------------------- - -function copy { - - local ACTIONNAM='' - local ACTIONVAL='' - local -a ACTIONVALS - local -a SRC - local DST='' - local COUNT=0 - - # Interpret arguments and options passed through command-line. - copy_getOptions - - # Redefine positional parameters using ARGUMENTS. At this point, - # option arguments have been removed from ARGUMENTS variable and - # only non-option arguments remain in it. - eval set -- "$ARGUMENTS" - - # Store remaining arguments into an array. This way it is possible - # to find out which is the last argument in the list. The last - # argument in the list is considered the target location while all - # other arguments are considered source locations. - for ACTIONVAL in "$@";do - ACTIONVALS[((++${#ACTIONVALS[*]}))]="$ACTIONVAL" - done - - # Define list of source locations using remaining arguments. - while [[ ${COUNT} -lt $((${#ACTIONVALS[*]} - 1)) ]];do - SRC[((++${#SRC[*]}))]=${ACTIONVALS[$COUNT]} - COUNT=$(($COUNT + 1)) - done - - # Define target location. - DST=$(cli_checkRepoDirTarget "${ACTIONVALS[((${#ACTIONVALS[*]} - 1))]}") - - # Loop through source locations and copy them to target location. - for ACTIONVAL in "${SRC[@]}";do - - # Check action value. Be sure the action value matches the - # convenctions defined for source locations inside the working - # copy. - cli_checkRepoDirSource - - # Syncronize changes between repository and working copy. At - # this point, changes in the repository are merged in the - # working copy and changes in the working copy committed up to - # repository. - cli_syncroRepoChanges "$ACTIONVAL $DST" - - # Copy source location to target location. - echo "svn copy $ACTIONVAL $DST" - - # Commit changes from working copy to central repository only. - # At this point, changes in the repository are not merged in - # the working copy, but chages in the working copy do are - # committed up to repository. - cli_commitRepoChanges "$ACTIONVAL $DST" - - # Update repository documentation manual structure. - centos-art help "$ACTIONVAL" "$DST" --copy - - done - -} diff --git a/Scripts/Functions/Copy/copy_getOptions.sh b/Scripts/Functions/Copy/copy_getOptions.sh deleted file mode 100755 index 55f04ec..0000000 --- a/Scripts/Functions/Copy/copy_getOptions.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash -# -# copy_getOptions.sh -- This function interprets option parameters -# passed to copy functionality and calls actions accordingly. -# -# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG -# -# 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., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# ---------------------------------------------------------------------- -# $Id$ -# ---------------------------------------------------------------------- - -function copy_getOptions { - - # Define short options we want to support. - local ARGSS="" - - # Define long options we want to support. - local ARGSL="quiet,answer-yes,dont-commit-changes" - - # Redefine ARGUMENTS variable using getopt output. - cli_parseArguments - - # Redefine positional parameters using ARGUMENTS variable. - eval set -- "$ARGUMENTS" - - # Look for options passed through command-line. - while true; do - - case "$1" in - - --quiet ) - FLAG_QUIET="true" - FLAG_DONT_COMMIT_CHANGES="true" - shift 1 - ;; - - --answer-yes ) - FLAG_ANSWER="true" - shift 1 - ;; - - --dont-commit-changes ) - FLAG_DONT_COMMIT_CHANGES="true" - shift 1 - ;; - - -- ) - # Remove the `--' argument from the list of arguments - # in order for processing non-option arguments - # correctly. At this point all option arguments have - # been processed already but the `--' argument still - # remains to mark ending of option arguments and - # begining of non-option arguments. The `--' argument - # needs to be removed here in order to avoid - # centos-art.sh script to process it as a path inside - # the repository, which obviously is not. - shift 1 - break - ;; - esac - done - - # Redefine ARGUMENTS variable using current positional parameters. - cli_parseArgumentsReDef "$@" - -}