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

build: use printf instead of echo #110

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dong-zeyu
Copy link
Contributor

@dong-zeyu dong-zeyu commented Oct 19, 2023

At

echo "#define GIT_VERSION \"$(GIT_VERSION)\"\n#define GIT_REVISION \"$(GIT_REVISION)\"" > version.h.tmp; \

echo gives

$ echo "#define GIT_VERSION \"v0.2.7\"\n#define GIT_REVISION \"e43e93c\""
#define GIT_VERSION "v0.2.7"\n#define GIT_REVISION "e43e93c"

while printf gives

$ printf "#define GIT_VERSION \"v0.2.7\"\n#define GIT_REVISION \"e43e93c\""
#define GIT_VERSION "v0.2.7"
#define GIT_REVISION "e43e93c"

This link explained why printf is preferred than echo.

@ayufan
Copy link
Owner

ayufan commented Nov 27, 2023

Thanks, will fix it.

@samdelong
Copy link

samdelong commented Dec 14, 2023

I ran into the same issue. I fixed by using echo -e.
Glad this is already in a PR!

It currently will not build until the change is made (RPI Arch), so this should be merged ASAP

@dong-zeyu
Copy link
Contributor Author

I rebased this patch on top of main branch. Now it should be ready to merge.

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