Blame Scripts/Bash/Cli/Functions/cli_doParseArgumentsReDef.sh

b7b189
#!/bin/bash
b7b189
#
2b5d62
# cli_doParseArgumentsReDef.sh -- This function initiates/reset
ceab07
# positional parameters based on `$@' variable.
b7b189
#
f5f046
# Copyright (C) 2009-2011 Alain Reguera Delgado
b7b189
# 
b7b189
# This program is free software; you can redistribute it and/or
b7b189
# modify it under the terms of the GNU General Public License as
b7b189
# published by the Free Software Foundation; either version 2 of the
b7b189
# License, or (at your option) any later version.
b7b189
# 
b7b189
# This program is distributed in the hope that it will be useful, but
b7b189
# 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
b7b189
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
b7b189
# USA.
b7b189
# 
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
}