| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function cli_printUrl { |
| |
| local URL='' |
| |
| |
| local ARGSS='' |
| |
| |
| local ARGSL='home,lists,wiki,forums,bugs,planet,docs,mirrors,irc,projects,projects-artwork,cc-sharealike,with-locale,as-html-link' |
| |
| |
| |
| local ARGUMENTS='' |
| |
| |
| cli_parseArgumentsReDef "$@" |
| |
| |
| cli_parseArguments |
| |
| |
| eval set -- "$ARGUMENTS" |
| |
| |
| while true; do |
| case "$1" in |
| |
| --home ) |
| URL='http://www.centos.org/' |
| shift 1 |
| ;; |
| |
| --lists ) |
| URL='http://lists.centos.org/' |
| shift 1 |
| ;; |
| |
| --wiki ) |
| URL='http://wiki.centos.org/' |
| shift 1 |
| ;; |
| |
| --forums ) |
| URL='http://forums.centos.org/' |
| shift 1 |
| ;; |
| |
| --bugs ) |
| URL='http://bugs.centos.org/' |
| shift 1 |
| ;; |
| |
| --projects ) |
| URL='https://projects.centos.org/' |
| shift 1 |
| ;; |
| |
| --projects-artwork ) |
| URL=$(cli_printUrl '--projects')svn/artwork/ |
| shift 1 |
| ;; |
| |
| --planet ) |
| URL='http://planet.centos.org/' |
| shift 1 |
| ;; |
| |
| --docs ) |
| URL='http://docs.centos.org/' |
| shift 1 |
| ;; |
| |
| --mirrors ) |
| URL='http://mirrors.centos.org/' |
| shift 1 |
| ;; |
| |
| --irc ) |
| URL='http://www.centos.org/modules/tinycontent/index.php?id=8' |
| shift 1 |
| ;; |
| |
| --cc-sharealike ) |
| URL="http://creativecommons.org/licenses/by-sa/3.0/" |
| shift 1 |
| ;; |
| |
| --with-locale ) |
| if [[ ! $(cli_getCurrentLocale) =~ '^en' ]];then |
| URL="${URL}$(cli_getCurrentLocale '--langcode-only')/" |
| fi |
| shift 1 |
| ;; |
| |
| --as-html-link ) |
| URL="<a href=\"$URL\">${URL}</a>" |
| shift 1 |
| ;; |
| |
| -- ) |
| |
| shift 1 |
| break |
| ;; |
| esac |
| done |
| |
| |
| echo "$URL" |
| |
| } |