From: Andre Noll Date: Wed, 24 Oct 2007 21:21:47 +0000 (+0200) Subject: command_util.sh: Don't replace newlines by spaces. X-Git-Tag: v0.3.0~213 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=5e54609eda6f4417e8b7042db59ecf47fd720751;p=paraslash.git command_util.sh: Don't replace newlines by spaces. --- diff --git a/command_util.sh b/command_util.sh index ad75c9b5..822cad2a 100755 --- a/command_util.sh +++ b/command_util.sh @@ -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