commit d3c5aa73f85b08069e1bf8d9e1befec24e455211
Author: Elan Ruusamäe <[email protected]>
Date:   Thu Feb 4 11:59:17 2010 +0000

    - avoid \n expanding in $command everywhere it is echoed out
    
    Changed files:
        client/make-request.sh -> 1.65

 make-request.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/make-request.sh b/make-request.sh
index 9a774a0..e99949d 100644
--- a/make-request.sh
+++ b/make-request.sh
@@ -222,7 +222,7 @@ while [ $# -gt 0 ] ; do
 
                --command | -c )
                        command="$2"
-                       if [ $command = - ]; then
+                       if [ "$command" = - ]; then
                                echo >&2 "Reading command from STDIN"
                                echo >&2 "---"
                                command=$(cat)
@@ -391,7 +391,9 @@ gen_req() {
                bid=$(uuidgen)
                echo -E >&2 "* Command: $command"
                echo "  <batch id='$bid' depends-on=''>"
-               echo "           <command flags='$command_flags'>$(echo -E 
"$command" | sed -e 's,&,\&amp;,g;s,<,\&lt;,g;s,>,\&gt;,g')</command>"
+               echo "           <command flags='$command_flags'>"
+               echo -E "$command" | sed -e 
's,&,\&amp;,g;s,<,\&lt;,g;s,>,\&gt;,g'
+               echo "</command>"
                echo "           <info></info>"
                for b in $builders; do
                        echo >&2 "* Builder: $b"
@@ -462,7 +464,7 @@ Message-Id: <$id@$(hostname)>
 X-New-PLD-Builder: request
 X-Requester-Version: \$Id$
 
-$(echo "$req" | gpg --clearsign --default-key $default_key $gpg_opts)
+$(echo -E "$req" | gpg --clearsign --default-key $default_key $gpg_opts)
 EOF
 }
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/cca6584b96e6c33d0732d559e43e100d804e2ecd

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to