Blame Scripts/Functions/Locale/locale_getOptions.sh
|
|
4c79b5 |
#!/bin/bash
|
|
|
4c79b5 |
#
|
|
|
9fe4a2 |
# locale_getOptions.sh -- This function interprets option parameters
|
|
|
9fe4a2 |
# passed to `locale' functionality and calls actions accordingly.
|
|
|
4c79b5 |
#
|
|
|
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 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# General Public License for more details.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# along with this program; if not, write to the Free Software
|
|
|
dcd347 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
7ac5a5 |
#
|
|
|
4c79b5 |
# ----------------------------------------------------------------------
|
|
|
418249 |
# $Id$
|
|
|
4c79b5 |
# ----------------------------------------------------------------------
|
|
|
4c79b5 |
|
|
|
9fe4a2 |
function locale_getOptions {
|
|
|
4c79b5 |
|
|
|
6c8ab9 |
|
|
|
786ebb |
local ARGSS=""
|
|
|
4c79b5 |
|
|
|
6c8ab9 |
|
|
|
3ccb0a |
local ARGSL="filter:,quiet,answer-yes,dont-commit-changes,update,edit,dont-create-mo"
|
|
|
4c79b5 |
|
|
|
6c8ab9 |
|
|
|
793c4c |
cli_parseArguments
|
|
|
4c79b5 |
|
|
|
6c8ab9 |
|
|
|
6c8ab9 |
|
|
|
6c8ab9 |
eval set -- "$ARGUMENTS"
|
|
|
4c79b5 |
|
|
|
bf6bff |
# Look for options passed through command-line.
|
|
|
6c8ab9 |
while true; do
|
|
|
6c8ab9 |
case "$1" in
|
|
|
6c8ab9 |
|
|
|
d74c16 |
|
|
|
d74c16 |
FLAG_FILTER="$2"
|
|
|
d74c16 |
shift 2
|
|
|
d74c16 |
|
|
|
d74c16 |
|
|
|
d74c16 |
|
|
|
d74c16 |
FLAG_QUIET="true"
|
|
|
d74c16 |
FLAG_DONT_COMMIT_CHANGES="true"
|
|
|
d74c16 |
shift 1
|
|
|
d74c16 |
|
|
|
d74c16 |
|
|
|
3ccb0a |
--answer-yes )
|
|
|
3ccb0a |
FLAG_ANSWER="true"
|
|
|
3ccb0a |
shift 1
|
|
|
d74c16 |
|
|
|
d74c16 |
|
|
|
d74c16 |
|
|
|
d74c16 |
FLAG_DONT_COMMIT_CHANGES="true"
|
|
|
d74c16 |
shift 1
|
|
|
d74c16 |
|
|
|
d74c16 |
|
|
|
786ebb |
|
|
|
4e4b4d |
ACTIONNAM="${FUNCNAM}_updateMessages"
|
|
|
d74c16 |
shift 1
|
|
|
6c8ab9 |
|
|
|
6c8ab9 |
|
|
|
6c8ab9 |
|
|
|
4e4b4d |
ACTIONNAM="${FUNCNAM}_editMessages"
|
|
|
d74c16 |
shift 1
|
|
|
6c8ab9 |
|
|
|
6c8ab9 |
|
|
|
0d4faa |
|
|
|
0d4faa |
FLAG_DONT_CREATE_MO="true"
|
|
|
6a8fb5 |
shift 1
|
|
|
6a8fb5 |
|
|
|
6a8fb5 |
|
|
|
763e48 |
|
|
|
763e48 |
|
|
|
763e48 |
# in order for processing non-option arguments
|
|
|
763e48 |
|
|
|
763e48 |
|
|
|
763e48 |
|
|
|
763e48 |
|
|
|
763e48 |
|
|
|
763e48 |
|
|
|
763e48 |
|
|
|
763e48 |
shift 1
|
|
|
6c8ab9 |
break
|
|
|
4e4b4d |
|
|
|
6c8ab9 |
esac
|
|
|
6c8ab9 |
done
|
|
|
6c8ab9 |
|
|
|
d74c16 |
|
|
|
793c4c |
cli_parseArgumentsReDef "$@"
|
|
|
bf6bff |
|
|
|
4c79b5 |
}
|