|
|
1971b4 |
#!/bin/bash
|
|
|
1971b4 |
#
|
|
|
83fca7 |
# cli_getCopyrightInfo.sh -- This function outputs the copyright
|
|
|
83fca7 |
# information of content produced by the centos-art command-line
|
|
|
83fca7 |
# interface.
|
|
|
83fca7 |
#
|
|
|
83fca7 |
# As I understand, the copyright exists to make people create more.
|
|
|
83fca7 |
# The copyright gives creators the legal power over their creations
|
|
|
83fca7 |
# and so the freedom to distribute them under the ethical terms the
|
|
|
83fca7 |
# creator considers better.
|
|
|
83fca7 |
#
|
|
|
83fca7 |
# At this moment I don't feel very sure about this legal affairs, but
|
|
|
83fca7 |
# need to decide what copyright information the centos-art will
|
|
|
83fca7 |
# output. So, I'm taking the wiki (wiki.centos.org) copyright
|
|
|
83fca7 |
# information as reference.
|
|
|
93aaae |
#
|
|
|
2d3646 |
# Copyright (C) 2009, 2010, 2011 The CentOS Project
|
|
|
fa95b1 |
#
|
|
|
fa95b1 |
# This program is free software; you can redistribute it and/or modify
|
|
|
fa95b1 |
# it under the terms of the GNU General Public License as published by
|
|
|
dcd347 |
# the Free Software Foundation; either version 2 of the License, or (at
|
|
|
dcd347 |
# your option) any later version.
|
|
|
fa95b1 |
#
|
|
|
74a058 |
# This program is distributed in the hope that it will be useful, but
|
|
|
74a058 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
1971b4 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
1971b4 |
# General Public License for more details.
|
|
|
1971b4 |
#
|
|
|
1971b4 |
# You should have received a copy of the GNU General Public License
|
|
|
1971b4 |
# along with this program; if not, write to the Free Software
|
|
|
dcd347 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
7ac5a5 |
#
|
|
|
1971b4 |
# ----------------------------------------------------------------------
|
|
|
1971b4 |
# $Id$
|
|
|
1971b4 |
# ----------------------------------------------------------------------
|
|
|
1971b4 |
|
|
|
1971b4 |
function cli_getCopyrightInfo {
|
|
|
1971b4 |
|
|
|
93aaae |
case "$1" in
|
|
|
93aaae |
|
|
|
93aaae |
'--license' )
|
|
|
93aaae |
|
|
|
1d5701 |
# Output default license name used by all image-based
|
|
|
1d5701 |
# creations inside CentOS Artwork Repository.
|
|
|
1d5701 |
echo "Creative Common Attribution-ShareAlike 3.0"
|
|
|
93aaae |
;;
|
|
|
1d5701 |
|
|
|
f1f97d |
'--license-url' )
|
|
|
f1f97d |
|
|
|
1d5701 |
# Ouput default license url used by all image-based
|
|
|
f1f97d |
# creations inside CentOS Artwork Repository.
|
|
|
1d5701 |
echo "http://creativecommons.org/licenses/by-sa/3.0/"
|
|
|
f1f97d |
;;
|
|
|
1971b4 |
|
|
|
1d5701 |
'--copyright-year' )
|
|
|
1d5701 |
|
|
|
1d5701 |
# Output default copyright year.
|
|
|
aaed27 |
date +%Y
|
|
|
1d5701 |
;;
|
|
|
1d5701 |
|
|
|
17dbe5 |
'--copyright-holder' )
|
|
|
1d5701 |
|
|
|
1d5701 |
# Output default copyright holder.
|
|
|
aaed27 |
echo "The CentOS Project"
|
|
|
1d5701 |
;;
|
|
|
1d5701 |
|
|
|
17dbe5 |
'--copyright' | * )
|
|
|
17dbe5 |
local YEAR=$(cli_getCopyrightInfo '--copyright-year')
|
|
|
17dbe5 |
local HOLDER=$(cli_getCopyrightInfo '--copyright-holder')
|
|
|
17dbe5 |
echo "Copyright © $YEAR $HOLDER"
|
|
|
17dbe5 |
;;
|
|
|
17dbe5 |
|
|
|
1d5701 |
esac
|
|
|
1971b4 |
|
|
|
1971b4 |
}
|