command_util: Fix quoting in template_loop().
[paraslash.git] / command_util.sh
index 847f87e4ccdd379330c36ed27dc65db4ecc96edb..86e0125865fdb24ceb1b42189430e7f5d31416c5 100755 (executable)
@@ -200,14 +200,6 @@ dump_proto()
        echo '/**'
        echo " * $desc_txt"
        echo ' *'
-       if [[ "$system_includes" =~ openssl/rc4.h ]]; then
-               echo ' * \param rc4c The rc4 crypt context.'
-       else
-               echo ' * \param fd The file descriptor to send output to.'
-       fi
-       echo ' * \param argc The number of arguments.'
-       echo ' * \param argv The argument vector.'
-       echo ' * '
        echo " * Usage: $usage_txt"
        echo ' * '
        echo "$help_txt" | sed -e 's/^/ * /g'
@@ -257,11 +249,11 @@ template_loop()
        for member in $template_members; do
                local sed_cmd="sed -e s/@member@/$member/g"
                #echo "sed_cmd: $sed_cmd"
-               name_txt=$(echo $t_name | $sed_cmd)
+               name_txt=$(echo "$t_name" | $sed_cmd)
                #name_txt="$tname"
-               perms_txt=$(echo $t_perms | $sed_cmd)
-               desc_txt=$(echo $t_desc | $sed_cmd)
-               usage_txt=$(echo $t_usage | $sed_cmd)
+               perms_txt=$(echo "$t_perms" | $sed_cmd)
+               desc_txt=$(echo "$t_desc" | $sed_cmd)
+               usage_txt=$(echo "$t_usage" | $sed_cmd)
                help_txt=$(printf "%s\n" "$t_help" | $sed_cmd)
                prototype=$(echo "$template_prototype" | $sed_cmd)
                $1