jkent / frogfs

Fast Read-Only General-purpose File System (ESP-IDF and ESP8266_RTOS_SDK compatible)
https://frogfs.readthedocs.io
Mozilla Public License 2.0
25 stars 32 forks source link

Fix for sed error during build #19

Closed RBogie closed 3 years ago

RBogie commented 4 years ago

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

jkent commented 4 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!

RBogie commented 4 years ago

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

jkent commented 4 years ago

Thank you very much @RBogie ! I'll test it this evening along with some tests for libesphttpd and esphttpd-freertos.

jkent commented 4 years ago

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.

jkent commented 3 years ago

This has been resolved by writing a python script to replace xxd.