acpid: replace "echo -e" with printf
PATCH v2 1/2 acpid: replace "echo -e" with printf
printf is POSIX-compliant, echo -e is not.
---
Changes v1 -> v2:
- Added trailing \n (Peter Korsgaard)
--- package/acpid/acpid.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/acpid/acpid.mk +1 -1
@@ -17,7 +17,7 @@ endef define ACPID_SET_EVENTS mkdir -p $(TARGET_DIR)/etc/acpi/events - /bin/echo -e "event=button[ /]power\naction=/sbin/poweroff" \ + printf "event=button[ /]power\naction=/sbin/poweroff\n" \ >$(TARGET_DIR)/etc/acpi/events/powerbtn endef
Signature · 1 line
2.0.0.rc0
PATCH v2 2/2 infra: pkg-utils.mk replace "echo -en" with printf
printf is POSIX-compliant, echo -e/n is not.
---
Changes v1 -> v2:
- Add a trailing \n while retaining splitted lines (Peter Korsgaard, Thomas De Schampheleire)
--- package/pkg-utils.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/pkg-utils.mk +2 -2
@@ -110,8 +110,8 @@ define legal-manifest # pkg, version, license, license-files, source, {HOST|TARG endef define legal-license-header # pkg, license-file, {HOST|TARGET} - echo -e "$(LEGAL_INFO_SEPARATOR)\n\t$(1):" \ - "$(2)\n$(LEGAL_INFO_SEPARATOR)\n\n" >>$(LEGAL_LICENSES_TXT_$(3)) + printf "$(LEGAL_INFO_SEPARATOR)\n\t$(1):\ + $(2)\n$(LEGAL_INFO_SEPARATOR)\n\n\n" >>$(LEGAL_LICENSES_TXT_$(3)) endef define legal-license-nofiles # pkg, {HOST|TARGET}
Signature · 1 line
2.0.0.rc0
PATCH v2 2/2 infra: pkg-utils.mk replace "echo -en" with printf
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Maxime" == Maxime Hadjinlian <[email protected]> writes:
printf is POSIX-compliant, echo -e/n is not.
This place didn't actually use 'echo -n', so I've adjusted the commit message and committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/2 acpid: replace "echo -e" with printf
In reply to Maxime HadjinlianQuoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Maxime" == Maxime Hadjinlian <[email protected]> writes:
printf is POSIX-compliant, echo -e is not.
Signed-off-by Maxime Hadjinlian <[email protected]>Cc Thomas De Schampheleire <[email protected]>---
Changes v1 -> v2:
- Added trailing \n (Peter Korsgaard)
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard