diff options
| author | Christoph Niedermaier <[email protected]> | 2022-02-23 10:33:36 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2022-04-07 16:50:53 -0400 |
| commit | 7d79cba28ca9bb02ba589eca2e80ce837d7d0ca8 (patch) | |
| tree | 36256bff8aa4dedcb3620d0cefd89007b292bc74 | |
| parent | eb68ead2d3f093dfeffae68045e8921d93ff05cf (diff) | |
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 <[email protected]>
Cc: Lukasz Majewski <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Tom Rini <[email protected]>
To: [email protected]
| -rwxr-xr-x | scripts/get_default_envs.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/get_default_envs.sh b/scripts/get_default_envs.sh index 3c6fdc45e11..fedf7206fe1 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} |
