standardebooks / web

The source code for the Standard Ebooks website.
https://standardebooks.org
Creative Commons Zero v1.0 Universal
235 stars 64 forks source link

sed --in-place isn’t posix compatible #136

Closed robinwhittleton closed 3 years ago

robinwhittleton commented 3 years ago

https://github.com/standardebooks/web/blob/241242749097fdecd64a9164f050ba689e25030c/www/contribute/producing-an-ebook-step-by-step.php#L118

Unfortunately switching from perl to sed has broken macOS compatibility, as --in-place is a GNU thing. Short of requiring mac users to brew install gnu-sed there don’t seem many clean options (see https://stackoverflow.com/questions/5694228/sed-in-place-flag-that-works-both-on-mac-bsd-and-linux).

What was the rationale for switching in the first place?

acabal commented 3 years ago

For consistency, since sed --in-place was used elsewhere in the guide but perl wasn't. But it looks like most of those have been replaced with interactive-replace so if you want to replace all of the instances of sed with perl then go for it.