Blame Automation/centos-art.conf.sh

Alain Reguera Delgado 615395
#!/bin/bash
Alain Reguera Delgado 954d94
######################################################################
Alain Reguera Delgado 8f60cb
#
Alain Reguera Delgado 1fcfcf
#   centos-art.conf.sh -- This file provides default configuration
Alain Reguera Delgado 1fcfcf
#   values to centos-art.sh script.
Alain Reguera Delgado 8f60cb
#
Alain Reguera Delgado 954d94
#   Written by:
Alain Reguera Delgado eaf263
#   * Alain Reguera Delgado <al@centos.org.cu>, 2009-2013
Alain Reguera Delgado 615395
#
Alain Reguera Delgado 615395
# Copyright (C) 2013 The CentOS Project
Alain Reguera Delgado 615395
#
Alain Reguera Delgado 615395
# This program is free software; you can redistribute it and/or modify
Alain Reguera Delgado 615395
# it under the terms of the GNU General Public License as published by
Alain Reguera Delgado 615395
# the Free Software Foundation; either version 2 of the License, or (at
Alain Reguera Delgado 615395
# your option) any later version.
Alain Reguera Delgado 615395
#
Alain Reguera Delgado 615395
# This program is distributed in the hope that it will be useful, but
Alain Reguera Delgado 615395
# WITHOUT ANY WARRANTY; without even the implied warranty of
Alain Reguera Delgado 615395
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Alain Reguera Delgado 615395
# General Public License for more details.
Alain Reguera Delgado 615395
#
Alain Reguera Delgado 615395
# You should have received a copy of the GNU General Public License
Alain Reguera Delgado 615395
# along with this program; if not, write to the Free Software
Alain Reguera Delgado 615395
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Alain Reguera Delgado 615395
#
Alain Reguera Delgado 954d94
######################################################################
Alain Reguera Delgado 8f60cb
Alain Reguera Delgado eaf263
######################################################################
Alain Reguera Delgado 954d94
# Script's identity configuration variables.
Alain Reguera Delgado eaf263
######################################################################
Alain Reguera Delgado eaf263
Alain Reguera Delgado 954d94
# Set the script name.
Alain Reguera Delgado 954d94
declare -x TCAR_SCRIPT_NAME="centos-art.sh"
Alain Reguera Delgado eaf263
Alain Reguera Delgado 954d94
# Set the script command name.
Alain Reguera Delgado 954d94
declare -x TCAR_SCRIPT_COMMAND="centos-art"
Alain Reguera Delgado eaf263
Alain Reguera Delgado eaf263
# Set the script version. You can use this number as pattern
Alain Reguera Delgado eaf263
# to identify the relation between the centos-artwork repository
Alain Reguera Delgado eaf263
# and the script. Both repository and script version must be the same.
Alain Reguera Delgado eaf263
# This way we can say that specific functionalities inside the script
Alain Reguera Delgado eaf263
# will work as expected when run over the repository directory structure.
Alain Reguera Delgado eaf263
declare -x TCAR_SCRIPT_VERSION='0.4'
Alain Reguera Delgado eaf263
Alain Reguera Delgado 5824c8
# Set the script modules directory.
Alain Reguera Delgado 5824c8
declare -x TCAR_SCRIPT_MODULES_BASEDIR=${TCAR_SCRIPT_BASEDIR}/Modules
Alain Reguera Delgado eaf263
Alain Reguera Delgado 954d94
# Set the script temporal directory.
Alain Reguera Delgado 954d94
declare -xr TCAR_SCRIPT_TEMPDIR=$(mktemp -p /tmp -d ${TCAR_SCRIPT_NAME}-XXXXXX)
Alain Reguera Delgado 8f60cb
Alain Reguera Delgado eaf263
######################################################################
Alain Reguera Delgado 954d94
# Internationalization configuration variables and functions.
Alain Reguera Delgado eaf263
######################################################################
Alain Reguera Delgado eaf263
Alain Reguera Delgado 954d94
# Set the script language information using the LC format. This format
Alain Reguera Delgado 954d94
# shows both language and country information (e.g., `es_ES').
Alain Reguera Delgado 954d94
declare -xr TCAR_SCRIPT_LANG_LC=$(echo ${LANG} | cut -d'.' -f1)
Alain Reguera Delgado eaf263
Alain Reguera Delgado 954d94
# Set the script language information using the LL format. This format
Alain Reguera Delgado 954d94
# shows only the language information (e.g., `es').
Alain Reguera Delgado 954d94
declare -xr TCAR_SCRIPT_LANG_LL=$(echo ${TCAR_SCRIPT_LANG_LC} | cut -d'_' -f1)
Alain Reguera Delgado eaf263
Alain Reguera Delgado 954d94
# Set the script language information using the CC format. This format
Alain Reguera Delgado 954d94
# shows only the country information (e.g., `ES').
Alain Reguera Delgado 954d94
declare -xr TCAR_SCRIPT_LANG_CC=$(echo ${TCAR_SCRIPT_LANG_LC} | cut -d'_' -f2)
Alain Reguera Delgado eaf263
Alain Reguera Delgado 954d94
# Set function environments required by GNU gettext system.
Alain Reguera Delgado 954d94
. gettext.sh
Alain Reguera Delgado eaf263
Alain Reguera Delgado 954d94
# Set the script text domain. This information is used by gettext
Alain Reguera Delgado 954d94
# system to retrieve translated strings from machine object (MO) files
Alain Reguera Delgado 954d94
# with this name. This variable is reset each time a new module is
Alain Reguera Delgado 954d94
# loaded, so the correct files can be used.
Alain Reguera Delgado 786ac0
declare -xr TEXTDOMAIN="${TCAR_SCRIPT_NAME}"
Alain Reguera Delgado eaf263
Alain Reguera Delgado 954d94
# Set the script text domain directory. This information is used by
Alain Reguera Delgado 954d94
# gettext system to know where the machine objects are stored in. This
Alain Reguera Delgado 954d94
# variable is reset each time a new module is loaded, so the correct
Alain Reguera Delgado 954d94
# files can be used.
Alain Reguera Delgado 786ac0
declare -xr TEXTDOMAINDIR=${TCAR_SCRIPT_BASEDIR}/Locales
Alain Reguera Delgado 954d94
Alain Reguera Delgado eaf263
######################################################################
Alain Reguera Delgado 0de111
# Module-specific configuration variables.
Alain Reguera Delgado eaf263
######################################################################
Alain Reguera Delgado eaf263
Alain Reguera Delgado 0de111
# This variable is used in different function environments to pass
Alain Reguera Delgado 0de111
# positional parameters from one environment to another using local
Alain Reguera Delgado 0de111
# definitions.
Alain Reguera Delgado 954d94
declare -x TCAR_ARGUMENTS=''
Alain Reguera Delgado eaf263
Alain Reguera Delgado 954d94
# Set absolute path to documentation search path. This is the location
Alain Reguera Delgado 954d94
# where final documentation formats (e.g., man pages) will be saved
Alain Reguera Delgado 954d94
# in.
Alain Reguera Delgado 954d94
declare -x TCAR_MANUAL_SEARCHPATH=${TCAR_SCRIPT_BASEDIR}/Manuals
Alain Reguera Delgado eaf263
Alain Reguera Delgado eaf263
# Set absolute path to documentation source format. This is the file
Alain Reguera Delgado eaf263
# we'll use as input to `a2x' command to produce documentation in
Alain Reguera Delgado eaf263
# different formats.
Alain Reguera Delgado eaf263
declare -x TCAR_MANUAL_FILE=${TCAR_MANUAL_SEARCHPATH}/${TCAR_SCRIPT_NAME}.asciidoc
Alain Reguera Delgado eaf263
Alain Reguera Delgado 954d94
# Set command used to read man pages. Include in this command the
Alain Reguera Delgado 954d94
# sarch path where final man pages live in.
Alain Reguera Delgado 954d94
declare -x TCAR_MANUAL_READER="/usr/bin/man -M ${TCAR_MANUAL_SEARCHPATH}"
Alain Reguera Delgado 0de111
Alain Reguera Delgado eaf263
######################################################################
Alain Reguera Delgado 0de111
# User-related configuration variables.
Alain Reguera Delgado eaf263
######################################################################
Alain Reguera Delgado eaf263
Alain Reguera Delgado 615395
# Set file path to your preferred text editor.  The editor you specify
Alain Reguera Delgado 615395
# will be use when you need to write commit messages and anything that
Alain Reguera Delgado 615395
# requires text edition.
Alain Reguera Delgado 52ee2e
declare -x  TCAR_USER_EDITOR=/usr/bin/vim
Alain Reguera Delgado eaf263
Alain Reguera Delgado 615395
# Set user-specific configuration file used by centos-art.sh script to
Alain Reguera Delgado 615395
# determine where to retrieve user-specific configuration values.
Alain Reguera Delgado 615395
# User-specific configuration files let you customize the way
Alain Reguera Delgado 615395
# centos-art.sh behaves in a multi-user environment. This variable
Alain Reguera Delgado 615395
# must be read-only.
Alain Reguera Delgado affd55
declare -xr TCAR_USER_CONFIG=${HOME}/.centos-art.conf.sh
Alain Reguera Delgado 8f60cb
Alain Reguera Delgado eaf263
######################################################################
Alain Reguera Delgado 615395
# Flag-related configuration variables.
Alain Reguera Delgado eaf263
######################################################################
Alain Reguera Delgado eaf263
Alain Reguera Delgado 615395
# Set filter flag (-f|--filter).  This flag is mainly used to reduce
Alain Reguera Delgado 615395
# the number of files to process and is interpreted as egrep-posix
Alain Reguera Delgado 615395
# regular expression.  By default, when this flag is not provided, all
Alain Reguera Delgado 615395
# paths in the working copy will match, except files inside hidden
Alain Reguera Delgado 615395
# directories like `.svn' and `.git' that will be omitted.
Alain Reguera Delgado 615395
declare -x  TCAR_FLAG_FILTER='[[:alnum:]_/-]+'
Alain Reguera Delgado eaf263
Alain Reguera Delgado 615395
# Set verbosity flag (-q|--quiet). This flag controls whether
Alain Reguera Delgado 615395
# centos-art.sh script prints messages or not. By default, all
Alain Reguera Delgado 615395
# messages are suppressed except those directed to standard error.
Alain Reguera Delgado 615395
declare -x  TCAR_FLAG_QUIET='false'
Alain Reguera Delgado eaf263
Alain Reguera Delgado 615395
# Set affirmative flag (-y|--yes). This flag controls whether
Alain Reguera Delgado 615395
# centos-art.sh script does or does not pass confirmation request
Alain Reguera Delgado 615395
# points. By default, it doesn't.
Alain Reguera Delgado 615395
declare -x  TCAR_FLAG_YES='false'