Blame Scripts/Modules/Prepare/prepare.sh

Alain Reguera Delgado 77084b
#!/bin/bash
Alain Reguera Delgado 77084b
######################################################################
Alain Reguera Delgado 77084b
#
Alain Reguera Delgado 77084b
#   tcar - The CentOS Artwork Repository automation tool.
Alain Reguera Delgado 77084b
#   Copyright © 2014 The CentOS Artwork SIG
Alain Reguera Delgado 77084b
#
Alain Reguera Delgado 77084b
#   This program is free software; you can redistribute it and/or
Alain Reguera Delgado 77084b
#   modify it under the terms of the GNU General Public License as
Alain Reguera Delgado 77084b
#   published by the Free Software Foundation; either version 2 of the
Alain Reguera Delgado 77084b
#   License, or (at your option) any later version.
Alain Reguera Delgado 77084b
#
Alain Reguera Delgado 77084b
#   This program is distributed in the hope that it will be useful,
Alain Reguera Delgado 77084b
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
Alain Reguera Delgado 77084b
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Alain Reguera Delgado 77084b
#   General Public License for more details.
Alain Reguera Delgado 77084b
#
Alain Reguera Delgado 77084b
#   You should have received a copy of the GNU General Public License
Alain Reguera Delgado 77084b
#   along with this program; if not, write to the Free Software
Alain Reguera Delgado 77084b
#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Alain Reguera Delgado 77084b
#
Alain Reguera Delgado 77084b
#   Alain Reguera Delgado <al@centos.org.cu>
Alain Reguera Delgado 77084b
#   39 Street No. 4426 Cienfuegos, Cuba.
Alain Reguera Delgado 77084b
#
Alain Reguera Delgado 77084b
######################################################################
Alain Reguera Delgado 77084b
Alain Reguera Delgado 310adc
# Standardize configuration tasks related to the repository's
Alain Reguera Delgado 310adc
# workplace.
Alain Reguera Delgado 77084b
#
Alain Reguera Delgado 77084b
# When you install The CentOS Artwork Repository most of its content
Alain Reguera Delgado 310adc
# is in source format (e.g., svgz, asciidoc, etc.). In order to
Alain Reguera Delgado 310adc
# produce final content and make the connections between the produced
Alain Reguera Delgado 310adc
# components, you need to process the source formats somewhere inside
Alain Reguera Delgado 310adc
# your workstation.  The prepare module takes the first non-option
Alain Reguera Delgado 310adc
# argument passed in the command-line as the working directory where
Alain Reguera Delgado 310adc
# you are going to process source formats in your workstation. During
Alain Reguera Delgado 310adc
# the preparation process, the prepare command creates the directory
Alain Reguera Delgado 310adc
# structure, the connection with The CentOS Artwork Repository using
Alain Reguera Delgado 310adc
# symbolic links, and images required to brand other images.
Alain Reguera Delgado 310adc
#
Alain Reguera Delgado 310adc
# prepare must be the first command you run after installing The
Alain Reguera Delgado 310adc
# CentOS Artwork Repository in your workstation.
Alain Reguera Delgado 77084b
function prepare {
Alain Reguera Delgado 77084b
Alain Reguera Delgado 310adc
    if [[ ${TCAR_SCRIPT_ARGUMENT} =~ '^ *$' ]];then
Alain Reguera Delgado 310adc
        prepare_printUsage
Alain Reguera Delgado 310adc
    else
Alain Reguera Delgado 310adc
        prepare_getOptions
Alain Reguera Delgado 310adc
    fi
Alain Reguera Delgado 77084b
Alain Reguera Delgado 77084b
    for TCAR_WORKDIR in ${TCAR_SCRIPT_ARGUMENT};do
Alain Reguera Delgado 310adc
        prepare_setWorkdir
Alain Reguera Delgado 77084b
    done
Alain Reguera Delgado 77084b
Alain Reguera Delgado 77084b
}