summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/ide_sdk.py
diff options
context:
space:
mode:
authorJamin Lin <jamin_lin@aspeedtech.com>2025-06-17 16:10:51 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-06-19 21:54:43 +0100
commit6d3b93af2e955a462f3f0a68693a07f5f1d775ff (patch)
treec70f8a827fce2d7566dbbe88189b191804309966 /scripts/lib/devtool/ide_sdk.py
parentd8cd58cc7ad5d8b7c92ef6eb6f0b973f0276422d (diff)
downloadpoky-6d3b93af2e955a462f3f0a68693a07f5f1d775ff.tar.gz
uboot-sign.bbclass: Refactor condition checks to use && and || instead of -a and -o
This commit cleans up and modernizes the shell condition expressions in `uboot-sign.bbclass` to follow best practices for portable and reliable shell usage. Key changes: - Replace legacy `[ -a ]` and `[ -o ]` with explicit `[ ] && [ ]` and `[ ] || [ ]`. Modern POSIX and busybox sh recommend using `&&` and `||` instead of `-a` and `-o` because `-a` and `-o` are less robust and can cause parsing ambiguities in some shells. - Simplify `concat_dtb()` by moving the DTB existence check to the top and using early `return` to avoid deep nesting. - Remove redundant fallback `else` blocks; use clearer control flow with direct checks. This improves maintainability, reduces shell syntax pitfalls, and aligns with current shell scripting best practices. References: - POSIX recommends avoiding `-a` and `-o` in `[ ]` and using explicit `&&` and `||`: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html (From OE-Core rev: d2740e39800a044d557b620e38ca0ac1b8c6d030) Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/ide_sdk.py')
0 files changed, 0 insertions, 0 deletions