All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/get_default_envs.sh: Remove blank lines
@ 2022-02-23  9:33 Christoph Niedermaier
  2022-04-08 12:30 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Niedermaier @ 2022-02-23  9:33 UTC (permalink / raw)
  To: u-boot; +Cc: Christoph Niedermaier, Lukasz Majewski, Rasmus Villemoes, Tom Rini

After sorting, unnoticed blank lines at the end move to the top.
Avoid this by removing it before sorting.

Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
---
 scripts/get_default_envs.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/get_default_envs.sh b/scripts/get_default_envs.sh
index 3c6fdc45e1..fedf7206fe 100755
--- a/scripts/get_default_envs.sh
+++ b/scripts/get_default_envs.sh
@@ -35,8 +35,8 @@ cp ${env_obj_file_path} ${ENV_OBJ_FILE_COPY}
 ${OBJCOPY} --dump-section .rodata.default_environment=${ENV_OBJ_FILE_COPY} \
 	${env_obj_file_path}
 
-# Replace default '\0' with '\n' and sort entries
-tr '\0' '\n' < ${ENV_OBJ_FILE_COPY} | sort --field-separator== -k1,1 --stable
+# Replace default '\0' with '\n' , remove blank lines and sort entries
+tr '\0' '\n' < ${ENV_OBJ_FILE_COPY} | sed -e '/^\s*$/d' | sort --field-separator== -k1,1 --stable
 
 rm ${ENV_OBJ_FILE_COPY}
 
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scripts/get_default_envs.sh: Remove blank lines
  2022-02-23  9:33 [PATCH] scripts/get_default_envs.sh: Remove blank lines Christoph Niedermaier
@ 2022-04-08 12:30 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2022-04-08 12:30 UTC (permalink / raw)
  To: Christoph Niedermaier; +Cc: u-boot, Lukasz Majewski, Rasmus Villemoes

[-- Attachment #1: Type: text/plain, Size: 471 bytes --]

On Wed, Feb 23, 2022 at 10:33:36AM +0100, Christoph Niedermaier wrote:

> After sorting, unnoticed blank lines at the end move to the top.
> Avoid this by removing it before sorting.
> 
> Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
> Cc: Lukasz Majewski <lukma@denx.de>
> Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> Cc: Tom Rini <trini@konsulko.com>
> To: u-boot@lists.denx.de

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-08 12:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23  9:33 [PATCH] scripts/get_default_envs.sh: Remove blank lines Christoph Niedermaier
2022-04-08 12:30 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.