Blame tcar-scripts-prepare/prepare_getWorkplaceDir.sh

Alain Reguera Delgado c554f1
#!/bin/bash
Alain Reguera Delgado c554f1
######################################################################
Alain Reguera Delgado c554f1
#
Alain Reguera Delgado a44aed
#   prepare_getWorkplaceDir.sh -- This function transform absolute
Alain Reguera Delgado a44aed
#   paths to configuration files inside The CentOS Artwork Repository
Alain Reguera Delgado a44aed
#   to directory absolute paths inside the workplace.
Alain Reguera Delgado c554f1
#
Alain Reguera Delgado c554f1
#   Written by:
Alain Reguera Delgado c554f1
#   * Alain Reguera Delgado <al@centos.org.cu>, 2009-2013
Alain Reguera Delgado c554f1
#
Alain Reguera Delgado c554f1
# Copyright (C) 2009-2013 The CentOS Artwork SIG
Alain Reguera Delgado c554f1
#
Alain Reguera Delgado c554f1
# This program is free software; you can redistribute it and/or modify
Alain Reguera Delgado c554f1
# it under the terms of the GNU General Public License as published by
Alain Reguera Delgado c554f1
# the Free Software Foundation; either version 2 of the License, or (at
Alain Reguera Delgado c554f1
# your option) any later version.
Alain Reguera Delgado c554f1
#
Alain Reguera Delgado c554f1
# This program is distributed in the hope that it will be useful, but
Alain Reguera Delgado c554f1
# WITHOUT ANY WARRANTY; without even the implied warranty of
Alain Reguera Delgado c554f1
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Alain Reguera Delgado c554f1
# General Public License for more details.
Alain Reguera Delgado c554f1
#
Alain Reguera Delgado c554f1
# You should have received a copy of the GNU General Public License
Alain Reguera Delgado c554f1
# along with this program; if not, write to the Free Software
Alain Reguera Delgado c554f1
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Alain Reguera Delgado c554f1
#
Alain Reguera Delgado c554f1
######################################################################
Alain Reguera Delgado c554f1
Alain Reguera Delgado a44aed
function prepare_getWorkplaceDir {
Alain Reguera Delgado c554f1
Alain Reguera Delgado a44aed
    local DIRECTORY=$1 
Alain Reguera Delgado c554f1
Alain Reguera Delgado a44aed
    echo ${DIRECTORY} \
Alain Reguera Delgado 70f7e0
        | sed -r -e "s!${TCAR_BASEDIR}/Models/!${TCAR_WORKDIR}/!" \
Alain Reguera Delgado a44aed
                 -e 's!/[a-z]+\.conf(\.tpl)?$!!'
Alain Reguera Delgado c554f1
Alain Reguera Delgado c554f1
}