diff options
| author | 2024-11-13 13:05:49 -0800 | |
|---|---|---|
| committer | 2024-11-13 23:23:11 +0000 | |
| commit | 7cd1d422c72f8ae0f0b9d8b312e113c3110c29a7 (patch) | |
| tree | c4200a8c6600543d5d18f99e2c3da9ba3986a109 /java/java.go | |
| parent | 06540bb808debb9efe410e518ce9f420bac9042c (diff) | |
Don't use echo -e
A rule that uses echo -e may execute in a dash shell instead of bash
when running on the build servers. The dash echo builtin is posix
compliant, and does not treat -e as an option[1]. Replace all uses
of echo -e with echo if it does not need escape sequences, or printf
if it does.
[1] https://wiki.ubuntu.com/DashAsBinSh#echo
Bug: 378931009
Test: manual
Change-Id: I2974f59ea10a613bc3bd36e3591fd81f38a1769a
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/java/java.go b/java/java.go index 078f578e1..64ef782f5 100644 --- a/java/java.go +++ b/java/java.go @@ -226,9 +226,9 @@ var ( // Rule for generating device binary default wrapper deviceBinaryWrapper = pctx.StaticRule("deviceBinaryWrapper", blueprint.RuleParams{ - Command: `echo -e '#!/system/bin/sh\n` + + Command: `printf '#!/system/bin/sh\n` + `export CLASSPATH=/system/framework/$jar_name\n` + - `exec app_process /$partition/bin $main_class "$$@"'> ${out}`, + `exec app_process /$partition/bin $main_class "$$@"\n'> ${out}`, Description: "Generating device binary wrapper ${jar_name}", }, "jar_name", "partition", "main_class") ) |