Closed RBogie closed 3 years ago
Hi @RBogie, thanks for your pull request. I'm not exactly sure how this fix works and I don't have a system to test on. Can you explain? Thank you!
The -i flag works as follows (According to the man pages)
-i extension Edit files in-place, saving backups with the specified extension. If a zero-length extension is given, no backup will be saved.
You are using a zero-length extension, and in linux this can be done implicitly, by simple ommiting the argument to the flag. The sed version on systems like BSD and osx don't allow to do this. They require the actual extension, which is zero-length in my PR. (https://stackoverflow.com/a/28592391 explains this as well)
TLDR: The sed command should still work the same, while now also working on OSX and BSD systems
Thank you very much @RBogie ! I'll test it this evening along with some tests for libesphttpd and esphttpd-freertos.
Hey @RBogie, sorry for not getting back on this. I've had problems getting GNU sed to work as you expect. I might have to just leave behind a backup file. I'll try to get around to testing this some more later this week.
This has been resolved by writing a python script to replace xxd.
This addition fixes the unterminated substitute pattern error you receive when running a build with this component included on a BSD system and/or macOs