Skip to content
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

Install and use gsed instead of sed on MacOS systems #3215

Merged
merged 2 commits into from
May 17, 2023

Conversation

zedi-pramodh
Copy link

Verified that "make pkgs" compilation works and was able to build eve on MacOS.

Signed-off-by: Pramodh Pallapothu <pramodh@zededa.com>

if [ "$OS" = "Darwin" ]; then
#If already installed, that is fine, error message goes to /dev/null
brew install gnu-sed > /dev/null 2>&1
Copy link
Member

@shjala shjala May 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest adding gnu-sed installation to the readme.md (section "On OSX (using Brew)" ) instead of installing it on the user's system without consent.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah makes sense. I will modify the commit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the BSD sed and this seems to be portable between BSD and GNU:
sed -i'' -e "/KBUILD_BUILD_TIMESTAMP/c\ - KBUILD_BUILD_TIMESTAMP=$KBUILD_BUILD_TIMESTAMP" "$k/build.yml"

replace the sed -i with sed -i'' -e, would you please check if this one works on Mac?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not work.

sed: 1: "/KBUILD_BUILD_TIMESTAMP ...": extra characters after \ at the end of c command

Signed-off-by: Pramodh Pallapothu <pramodh@zededa.com>
Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGT @shjala

@eriknordmark eriknordmark merged commit aad5b83 into lf-edge:master May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants