Merge "Fix mac build w/echo -n"

This commit is contained in:
Treehugger Robot 2018-12-05 00:53:46 +00:00 committed by Gerrit Code Review
commit 4322f4008f

View file

@ -54,8 +54,10 @@ var (
embeddedPar = pctx.AndroidStaticRule("embeddedPar", embeddedPar = pctx.AndroidStaticRule("embeddedPar",
blueprint.RuleParams{ blueprint.RuleParams{
// `echo -n` to trim the newline, since the python code just wants the name // `echo -n` to trim the newline, since the python code just wants the name.
Command: `echo -n '$main' > $entryPoint &&` + // /bin/sh (used by ninja) on Mac turns off posix mode, and stops supporting -n.
// Explicitly use bash instead.
Command: `/bin/bash -c "echo -n '$main' > $entryPoint" &&` +
`$mergeParCmd -p --prefix $launcher -e $entryPoint $out $srcsZips && ` + `$mergeParCmd -p --prefix $launcher -e $entryPoint $out $srcsZips && ` +
`chmod +x $out && (rm -f $entryPoint)`, `chmod +x $out && (rm -f $entryPoint)`,
CommandDeps: []string{"$mergeParCmd"}, CommandDeps: []string{"$mergeParCmd"},