Blame Scripts/Bash/centos-art.sh

878a2b
#!/bin/bash
878a2b
#
878a2b
# centos-art.sh -- The CentOS Artwork Repository automation tool.
878a2b
#
03486a
# Copyright (C) 2009, 2010, 2011, 2012 The CentOS Project
878a2b
#
878a2b
# This program is free software; you can redistribute it and/or modify
878a2b
# it under the terms of the GNU General Public License as published by
03486a
# the Free Software Foundation; either version 2 of the License, or (at
03486a
# your option) any later version.
878a2b
#
878a2b
# This program is distributed in the hope that it will be useful, but
878a2b
# WITHOUT ANY WARRANTY; without even the implied warranty of
878a2b
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
878a2b
# General Public License for more details.
878a2b
#
878a2b
# You should have received a copy of the GNU General Public License
878a2b
# along with this program; if not, write to the Free Software
878a2b
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
878a2b
#
878a2b
# ----------------------------------------------------------------------
878a2b
# $Id$
878a2b
# ----------------------------------------------------------------------
878a2b
218057
# Initialize absolute path to the working copy.
d97f4e
if [[ ! $TCAR_WORKDIR ]] || [[ $TCAR_WORKDIR == "" ]];then
d97f4e
    TCAR_WORKDIR=${HOME}/artwork
d97f4e
fi
d97f4e
2ab0b2
# Initialize repository brand information.
2ab0b2
if [[ ! $TCAR_BRAND ]] || [[ $TCAR_BRAND == "" ]] ;then
2ab0b2
    TCAR_BRAND='centos'
2ab0b2
fi
2ab0b2
218057
# Initialize script-specific configuration variables.
2ab0b2
declare -xr CLI_NAME="${TCAR_BRAND}-art"
4df0dd
declare -xr CLI_VERSION='0.0.4'
218057
declare -xr CLI_LANG_LC=$(echo ${LANG} | cut -d'.' -f1)
218057
declare -xr CLI_LANG_LL=$(echo ${CLI_LANG_LC} | cut -d'_' -f1)
218057
declare -xr CLI_LANG_CC=$(echo ${CLI_LANG_LC} | cut -d'_' -f2)
d97f4e
declare -xr CLI_BASEDIR="${TCAR_WORKDIR}/trunk/Scripts/Bash"
2a2d9c
declare -xr CLI_FUNCDIR="${CLI_BASEDIR}/Functions"
878a2b
8f84ba
# Initialize internazionalization through GNU gettext.
8f84ba
. gettext.sh
1d56ce
declare -xr TEXTDOMAIN=${CLI_NAME}.sh
d97f4e
declare -xr TEXTDOMAINDIR=${TCAR_WORKDIR}/trunk/Locales/Scripts/Bash
8f84ba
218057
# Initialize absolute path to temporal directory.
218057
declare -xr TMPDIR="$(mktemp -p /tmp -d ${CLI_NAME}.sh-XXXXXX)"
218057
878a2b
# Initialize command-line interface.
8d8a61
if [[ -x ${CLI_FUNCDIR}/Commons/cli.sh ]];then
8d8a61
    . ${CLI_FUNCDIR}/Commons/cli.sh; export -f 'cli'; cli "$@"
f97c6b
fi