Blame Scripts/Functions/cli_getRepoParallelDirs.sh
|
|
328582 |
#!/bin/bash
|
|
|
328582 |
#
|
|
|
179346 |
# cli_getRepoParallelDirs.sh -- This function returns the parallel
|
|
|
179346 |
|
|
|
179346 |
# parent directory.
|
|
|
328582 |
#
|
|
|
3b0984 |
# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
|
|
|
fa95b1 |
#
|
|
|
fa95b1 |
# This program is free software; you can redistribute it and/or modify
|
|
|
fa95b1 |
|
|
|
dcd347 |
|
|
|
dcd347 |
|
|
|
fa95b1 |
#
|
|
|
74a058 |
|
|
|
74a058 |
|
|
|
328582 |
|
|
|
328582 |
# General Public License for more details.
|
|
|
328582 |
#
|
|
|
328582 |
|
|
|
328582 |
# along with this program; if not, write to the Free Software
|
|
|
dcd347 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
7ac5a5 |
#
|
|
|
328582 |
# ----------------------------------------------------------------------
|
|
|
328582 |
# $Id$
|
|
|
328582 |
# ----------------------------------------------------------------------
|
|
|
328582 |
|
|
|
179346 |
function cli_getRepoParallelDirs {
|
|
|
328582 |
|
|
|
179346 |
local BOND=''
|
|
|
179346 |
local TDIR=''
|
|
|
179346 |
local -a PDIRS
|
|
|
328582 |
|
|
|
179346 |
# Define bond string using first positional parameter as
|
|
|
179346 |
|
|
|
179346 |
if [[ "$1" != '' ]];then
|
|
|
179346 |
BOND="$1"
|
|
|
179346 |
elif [[ "$ACTIONVAL" != '' ]];then
|
|
|
179346 |
BOND="$ACTIONVAL"
|
|
|
179346 |
else
|
|
|
d92109 |
cli_printMessage "`gettext "The bond string is required."`" --as-error-line
|
|
|
179346 |
fi
|
|
|
328582 |
|
|
|
179346 |
|
|
|
179346 |
TDIR=$(cli_getRepoTLDir ${BOND})
|
|
|
328582 |
|
|
|
179346 |
|
|
|
8c7287 |
PDIRS[0]=Manuals/$(cli_getCurrentLocale)/Texinfo/Repository/$(cli_getRepoTLDir ${BOND} --relative)
|
|
|
179346 |
PDIRS[1]=Scripts/Bash/Functions/Render/Config
|
|
|
77e30a |
PDIRS[2]=Locales
|
|
|
179346 |
|
|
|
179346 |
|
|
|
e6e90a |
BOND=$(echo $BOND | sed -r "s,^${TDIR}/(.+)$,\1,")
|
|
|
179346 |
|
|
|
179346 |
|
|
|
179346 |
|
|
|
179346 |
|
|
|
e6e90a |
for PDIR in "${PDIRS[@]}";do
|
|
|
179346 |
echo ${TDIR}/${PDIR}/${BOND}
|
|
|
179346 |
done
|
|
|
328582 |
|
|
|
328582 |
}
|