-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake: avoid using bash and output redirection #42
Conversation
Can we merge this? |
"which dtc && dtc -I dts -O dtb ${CAMKES_ARM_LINUX_DIR}/${device_tree_src} > linux/linux-dtb" | ||
dtc -I dts -O dtb -o linux/linux-dtb ${CAMKES_ARM_LINUX_DIR}/${device_tree_src} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does anyone know why the which
was in there? Is there a danger that there might be multiple dtc
commands on the same system and we can get the wrong one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess is, it is a smart trick to fail if the dtc
program is missing. Because the output redirectection may just produce an empty file, but no error in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right that makes sense. And we would now also fail, so the behaviour is preserved. Happy with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally looks fine, I'm just not entirely sure why which
was there in the first place
Looks like Kent introduced it in commit fa4fadf in 2017 in file |
Do no use shell features, just use program features Signed-off-by: Axel Heider <[email protected]>
Since #46 from @chrisguikema got merged yesterday, I am applying the change there also. |
Simplify command and avoids depending on shell features, just use program features.