Skip to content

Commit abe7b78

Browse files
author
Vladimir Kotal
committed
check setconf tag properly
fixes #1973
1 parent 4734f2f commit abe7b78

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

tools/Messages

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,11 @@ Usage()
7171
echo " Message types:"
7272
echo " config:"
7373
echo " - set or get configuration"
74-
echo " - query is formed in the message <text>:"
74+
echo " - query is formed in the message <tag>:"
7575
echo " - \"setconf\" send configuration to webapp."
76-
echo " Requires input file as argument."
76+
echo " Requires input file as argument in <text>."
7777
echo " - \"getconf\" retrieves configuration from webapp."
7878
echo " Prints the configuration in XML to stdout."
79-
echo " - or as a <tag>:"
8079
echo " - \"set\" sets the particular configuration option (only primitive types)"
8180
echo " in the webapp."
8281
echo " Examples:"
@@ -384,11 +383,11 @@ do
384383
echo "Unknown option \"$opt\"" && Usage && exit 5
385384
;;
386385
*)
387-
if [ "$MESSAGE_TYPE" = "config" -a "$1" = "setconf" ]
388-
then
389-
MESSAGE_TAGS+=(-g "setconf")
390-
shift
391-
MESSAGE_FILE="$@"
386+
if [ "$MESSAGE_TYPE" = "config" ]; then
387+
tags=${MESSAGE_TAGS[@]}
388+
if [ "$tags" == "-g setconf" ]; then
389+
MESSAGE_FILE="$@"
390+
fi
392391
else
393392
if [ $# -ne 1 ]
394393
then

0 commit comments

Comments
 (0)