diff mbox

[4/4] infra: pkg-utils.mk replace "echo -en" with printf

Message ID 1400063214-29462-5-git-send-email-maxime.hadjinlian@gmail.com
State Superseded
Headers show

Commit Message

Maxime Hadjinlian May 14, 2014, 10:26 a.m. UTC
printf is POSIX-compliant, echo -e/n is not.

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
 package/pkg-utils.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Korsgaard May 16, 2014, 8:40 p.m. UTC | #1
>>>>> "Maxime" == Maxime Hadjinlian <maxime.hadjinlian@gmail.com> writes:

 > printf is POSIX-compliant, echo -e/n is not.
 > Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
 > ---
 >  package/pkg-utils.mk | 2 +-
 >  1 file changed, 1 insertion(+), 1 deletion(-)

 > diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
 > index da3f0fc..f299e55 100644
 > --- a/package/pkg-utils.mk
 > +++ b/package/pkg-utils.mk
 > @@ -110,7 +110,7 @@ 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):" \
 > +	printf "$(LEGAL_INFO_SEPARATOR)\n\t$(1):" \
 >  		"$(2)\n$(LEGAL_INFO_SEPARATOR)\n\n" >>$(LEGAL_LICENSES_TXT_$(3))

Same as for acpid. Are you sure the missing newline doesn't matter?
diff mbox

Patch

diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index da3f0fc..f299e55 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -110,7 +110,7 @@  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):" \
+	printf "$(LEGAL_INFO_SEPARATOR)\n\t$(1):" \
 		"$(2)\n$(LEGAL_INFO_SEPARATOR)\n\n" >>$(LEGAL_LICENSES_TXT_$(3))
 endef