]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] newline in echo isn't portable
authorEvan Hunt <each@isc.org>
Tue, 19 Mar 2013 02:59:13 +0000 (19:59 -0700)
committerEvan Hunt <each@isc.org>
Tue, 19 Mar 2013 02:59:51 +0000 (19:59 -0700)
util/branchsync.sh

index ce6ceb8fbecbc48997191f9f92089af67a8413eb..09406a9fbaa7f51a8358d600dfb4260b75d12fa9 100644 (file)
@@ -108,13 +108,18 @@ git log $SOURCEBRANCH --reverse --format='%H' $LASTHASH..$SOURCEBRANCH | \
             git reset --hard
 
             # build mail message
-            MESSAGE="Attempt to cherry pick ${hash}\nto $BRANCH failed."
-            MESSAGE=$MESSAGE"\nCommit message of change was:\n"
-            MESSAGE=$MESSAGE"`git log -1 --pretty=format:%s%n%b ${hash}`"
             subject="Branch sync to $BRANCH failed"
+            cat << EOF > /tmp/branchmsg.$$
+Attempt to cherry pick ${hash}
+to $BRANCH failed.
+
+Commit message of change was:
+`git log -1 --pretty=format:%s%n%b ${hash}`
+EOF
 
             # send mail
-            echo "$MESSAGE" | mail -s "$subject" bind-changes
+            cat /tmp/branchmsg.$$ | mail -s "$subject" bind-changes
+            rm /tmp/branchmsg.$$
         fi
 
         break