aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-05-17 00:31:06 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-05-17 00:31:08 +0000
commit2c13abc95e3e2c6c12fff6aa42262ef3296c2a1b (patch)
treed8721ce185fc9844fc5fb004955f1e824ba195ec /android
parente121bbbb3bc6088dd7a965cf391cdd646dc6634c (diff)
parent270051119a21ae5f73aa69b16ce2fb53cae534d3 (diff)
downloadbuild_soong-2c13abc95e3e2c6c12fff6aa42262ef3296c2a1b.tar.gz
build_soong-2c13abc95e3e2c6c12fff6aa42262ef3296c2a1b.tar.bz2
build_soong-2c13abc95e3e2c6c12fff6aa42262ef3296c2a1b.zip
Merge "Fix the issue "\n" didn't get interpreted properly."
Diffstat (limited to 'android')
-rw-r--r--android/defs.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/android/defs.go b/android/defs.go
index 6f463162..a7ba219a 100644
--- a/android/defs.go
+++ b/android/defs.go
@@ -80,9 +80,12 @@ var (
Description: "concatenate licenses $out",
})
+ // ubuntu 14.04 offcially use dash for /bin/sh, and its builtin echo command
+ // doesn't support -e option. Therefore we force to use /bin/bash when writing out
+ // content to file.
WriteFile = pctx.AndroidStaticRule("WriteFile",
blueprint.RuleParams{
- Command: "echo '$content' > $out",
+ Command: "/bin/bash -c 'echo -e $$0 > $out' '$content'",
Description: "writing file $out",
},
"content")