From bc11d9e00f111694c391ef8d2a3a728d9eb16f5f Mon Sep 17 00:00:00 2001 From: Christoph Niedermaier Date: Wed, 23 Feb 2022 10:33:36 +0100 Subject: [PATCH] scripts/get_default_envs.sh: Remove blank lines After sorting, unnoticed blank lines at the end move to the top. Avoid this by removing it before sorting. Signed-off-by: Christoph Niedermaier Cc: Lukasz Majewski Cc: Rasmus Villemoes Cc: Tom Rini 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.39.5