From 1971b4a49a111125d522e4fc61d32011f9e0a9cf Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jan 17 2011 03:33:48 +0000 Subject: Add cli_getCopyrightInfo.sh. --- diff --git a/Scripts/Bash/Functions/cli_getCopyrightInfo.sh b/Scripts/Bash/Functions/cli_getCopyrightInfo.sh new file mode 100755 index 0000000..c6eecb4 --- /dev/null +++ b/Scripts/Bash/Functions/cli_getCopyrightInfo.sh @@ -0,0 +1,64 @@ +#!/bin/bash +# +# cli_getCopyrightInfo.sh -- This function outputs copyright +# information based on action value (ACTIONVAL) variable. +# +# 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$ +# ---------------------------------------------------------------------- + +function cli_getCopyrightInfo { + + # Define default copyright information. + local COPYRIGHT="Copyright © 2003-$(date +%Y) The CentOS Project. All rights reserved." + + # When the concept directory structure of an artistic motif is + # rendered, redefine copyright information printed on images to + # reflect the fact that authors of artistic motifs own the + # creation rights of the artistic motif. We want to motivate + # people to produce more artistic motifs, so they should have the + # creation rights of artistic motifs they create and also know + # that fact. + # + # In order for an artistic motif to store under CentOS Artwork + # Repository, the author of the artistic motif needs to agree the + # terms of the license The CentOS Project set for the CentOS + # artistic motifs to have. Otherwise, The CentOS Project should + # reject that artistic motif from being stored under CentOS + # Artwork Repository. + if [[ $ACTIONVAL =~ "$(cli_getRepoTLDir)/Identity/Themes/Motifs/$(cli_getThemeName)/Concept" ]];then + + # Define path to file containing artistic motifs authors + # copyright information. + local AUTHORS="$(cli_getRepoTLDir)/Identity/Themes/Motifs/$(cli_getThemeName)/authors.txt" + + # Verify file containing artistic motifs authors' copyright + # information and redefine default copyright information to + # use authors' copyright information instead. + if [[ -f $AUTHORS ]];then + COPYRIGHT="$(cat $AUTHORS)" + fi + + fi + + # Print copyright information. + echo $COPYRIGHT + +}