]> git.tue.mpg.de Git - paraslash.git/commitdiff
command_util.sh: Don't replace newlines by spaces.
authorAndre Noll <maan@systemlinux.org>
Wed, 24 Oct 2007 21:21:47 +0000 (23:21 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 24 Oct 2007 21:21:47 +0000 (23:21 +0200)
command_util.sh

index ad75c9b575680bc7c6310610ffece6dc358cbfd5..822cad2af5a74037867e95d5613c27e8eb56f2ee 100755 (executable)
@@ -241,7 +241,7 @@ dump_array_member()
        echo ".description = \"$desc_txt\","
        echo ".usage = \"$usage_txt\","
        echo ".help = "
-       echo "$help_txt" | sed -e 's/^/\"/g' -e 's/$/\\n\"/g'
+       printf "%s\n" "$help_txt" | sed -e 's/^/\"/g' -e 's/$/\\n\"/g'
        echo '},'
 }
 
@@ -263,7 +263,7 @@ template_loop()
                perms_txt=$(echo $t_perms | $sed_cmd)
                desc_txt=$(echo $t_desc | $sed_cmd)
                usage_txt=$(echo $t_usage | $sed_cmd)
-               help_txt=$(echo $t_help | $sed_cmd)
+               help_txt=$(printf "%s" "$t_help" | $sed_cmd)
                prototype=$(echo "$template_prototype" | $sed_cmd)
                $1
        done