|
|
9895fd |
#!/bin/bash
|
|
|
9895fd |
#
|
|
|
9895fd |
|
|
|
9895fd |
# printed inside centos-art.sh script. This function describes the
|
|
|
9895fd |
# domain organization of The CentOS Project through its URLs and
|
|
|
9895fd |
# provides a way to print them out when needed.
|
|
|
9895fd |
#
|
|
|
3b0984 |
# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
|
|
|
9895fd |
#
|
|
|
9895fd |
# This program is free software; you can redistribute it and/or modify
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
#
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
# General Public License for more details.
|
|
|
9895fd |
#
|
|
|
9895fd |
|
|
|
9895fd |
# along with this program; if not, write to the Free Software
|
|
|
9895fd |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
9895fd |
#
|
|
|
9895fd |
# ----------------------------------------------------------------------
|
|
|
9895fd |
# $Id$
|
|
|
9895fd |
# ----------------------------------------------------------------------
|
|
|
9895fd |
|
|
|
9895fd |
function cli_printUrl {
|
|
|
9895fd |
|
|
|
9895fd |
local URL=''
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
local ARGSS=''
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
078286 |
local ARGSL='home,lists,wiki,forums,bugs,planet,docs,mirrors,irc,projects,projects-artwork,cc-sharealike,with-locale,as-html-link'
|
|
|
9895fd |
|
|
|
9895fd |
# Define ARGUMENTS as local variable in order to parse options
|
|
|
9895fd |
|
|
|
9895fd |
local ARGUMENTS=''
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
793c4c |
cli_parseArgumentsReDef "$@"
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
793c4c |
cli_parseArguments
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
eval set -- "$ARGUMENTS"
|
|
|
9895fd |
|
|
|
9895fd |
# Look for options passed through command-line.
|
|
|
9895fd |
while true; do
|
|
|
9895fd |
case "$1" in
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
URL='http://www.centos.org/'
|
|
|
9895fd |
shift 1
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
URL='http://lists.centos.org/'
|
|
|
9895fd |
shift 1
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
URL='http://wiki.centos.org/'
|
|
|
9895fd |
shift 1
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
URL='http://forums.centos.org/'
|
|
|
9895fd |
shift 1
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
URL='http://bugs.centos.org/'
|
|
|
9895fd |
shift 1
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
078286 |
URL='https://projects.centos.org/'
|
|
|
9895fd |
shift 1
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
078286 |
URL=$(cli_printUrl '--projects')svn/artwork/
|
|
|
9895fd |
shift 1
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
URL='http://planet.centos.org/'
|
|
|
9895fd |
shift 1
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
URL='http://docs.centos.org/'
|
|
|
9895fd |
shift 1
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
URL='http://mirrors.centos.org/'
|
|
|
9895fd |
shift 1
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
URL='http://www.centos.org/modules/tinycontent/index.php?id=8'
|
|
|
9895fd |
shift 1
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
8f311a |
|
|
|
8f311a |
URL="http://creativecommons.org/licenses/by-sa/3.0/"
|
|
|
8f311a |
shift 1
|
|
|
8f311a |
|
|
|
8f311a |
|
|
|
9895fd |
--with-locale )
|
|
|
9895fd |
if [[ ! $(cli_getCurrentLocale) =~ '^en' ]];then
|
|
|
9895fd |
URL="${URL}$(cli_getCurrentLocale '--langcode-only')/"
|
|
|
9895fd |
fi
|
|
|
9895fd |
shift 1
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
--as-html-link )
|
|
|
9895fd |
URL="${URL}"
|
|
|
9895fd |
shift 1
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
shift 1
|
|
|
9895fd |
break
|
|
|
9895fd |
|
|
|
9895fd |
esac
|
|
|
9895fd |
done
|
|
|
9895fd |
|
|
|
9895fd |
|
|
|
9895fd |
echo "$URL"
|
|
|
9895fd |
|
|
|
9895fd |
}
|