Do not output two trailing newlines in generated bp files.

Test: m platform-mainline-sdk
  Check Android.bp in the generated platform-mainline-sdk-current.zip.
Bug: 156286550
Change-Id: Ifb99288f3b85c3b986270d48e2dc7d9e15fa7536
This commit is contained in:
Martin Stjernholm 2021-04-20 15:54:21 +01:00
parent 731bb91b8e
commit ee9b24e6d2
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ func (gf *generatedFile) build(pctx android.PackageContext, ctx android.BuilderC
rb.Command().
Implicits(implicits).
Text("echo").Text(proptools.ShellEscape(content)).
Text("echo -n").Text(proptools.ShellEscape(content)).
// convert \\n to \n
Text("| sed 's/\\\\n/\\n/g' >").Output(gf.path)
rb.Command().