Blame Scripts/Functions/Prepare/prepare_doLinksSuffixes.sh

befe73
#!/bin/bash
befe73
#
befe73
# prepare_doLinksSuffixes.sh -- This function uses the first argument
befe73
# passed as reference to build the link suffix required by
befe73
# prepare_doLinks function.
befe73
#
befe73
# Copyright (C) 2009-2011 Alain Reguera Delgado
befe73
#
befe73
# This program is free software; you can redistribute it and/or modify
befe73
# it under the terms of the GNU General Public License as published by
befe73
# the Free Software Foundation; either version 2 of the License, or (at
befe73
# your option) any later version.
befe73
#
befe73
# This program is distributed in the hope that it will be useful, but
befe73
# WITHOUT ANY WARRANTY; without even the implied warranty of
befe73
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
befe73
# General Public License for more details.
befe73
#
befe73
# You should have received a copy of the GNU General Public License
befe73
# along with this program; if not, write to the Free Software
befe73
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
befe73
# ----------------------------------------------------------------------
befe73
# $Id$
befe73
# ----------------------------------------------------------------------
befe73
befe73
function prepare_doLinksSuffixes {
befe73
befe73
    local FILE="$1"
befe73
    local SUFFIX='centos-'
befe73
befe73
    if [[ "$FILE" =~ "$(cli_getPathComponent '--theme-pattern')" ]];then
befe73
        SUFFIX="${SUFFIX}$(cli_getRepoName "$(cli_getPathComponent "$FILE" '--theme-name')" 'f')-"
befe73
        SUFFIX="${SUFFIX}$(cli_getPathComponent "$FILE" '--theme-release')-"
befe73
    fi
befe73
befe73
    echo "${SUFFIX}"
befe73
befe73
}