Blame Scripts/Functions/cli_doParseArgumentsReDef.sh

b7b189
#!/bin/bash
b7b189
#
2b5d62
# cli_doParseArgumentsReDef.sh -- This function initiates/reset
ceab07
# positional parameters based on `$@' variable.
b7b189
#
2d3646
# Copyright (C) 2009, 2010, 2011 The CentOS Project
fa95b1
#
fa95b1
# This program is free software; you can redistribute it and/or modify
fa95b1
# it under the terms of the GNU General Public License as published by
dcd347
# the Free Software Foundation; either version 2 of the License, or (at
dcd347
# your option) any later version.
fa95b1
#
74a058
# This program is distributed in the hope that it will be useful, but
74a058
# WITHOUT ANY WARRANTY; without even the implied warranty of
b7b189
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
b7b189
# General Public License for more details.
b7b189
#
b7b189
# You should have received a copy of the GNU General Public License
b7b189
# along with this program; if not, write to the Free Software
dcd347
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
7ac5a5
#
b7b189
# ----------------------------------------------------------------------
b7b189
# $Id$
b7b189
# ----------------------------------------------------------------------
b7b189
b7b189
function cli_doParseArgumentsReDef {
b7b189
b7b189
    local ARG
b7b189
b7b189
    # Clean up arguments global variable.
b7b189
    ARGUMENTS=''
b7b189
b7b189
    # Fill up arguments global variable with current positional
0a77e5
    # parameter  information. To avoid interpretation problems, use
0a77e5
    # single quotes to enclose each argument (ARG) from command-line
0a77e5
    # idividually.
b7b189
    for ARG in "$@"; do
0a77e5
        ARGUMENTS="$ARGUMENTS '$ARG'"
b7b189
    done
b7b189
b7b189
}