This is an archive of the discontinued LLVM Phabricator instance.

[LLDB] Fix script to work with GNU sed
AbandonedPublic

Authored by smeenai on Aug 28 2018, 12:16 PM.

Details

Summary

GNU sed and BSD sed have a different command-line syntax for in-place
editing, and the current form of the script would only work with BSD
sed. The easiest way to get cross-platform behavior is to specify a
backup suffix and then just delete the backup file at the end. (BSD sed
is the default on macOS, but it's possible to acquire GNU coreutils and
have your sed be GNU sed even on macOS; I'm aware it's not officially
supported in any capacity, but it's easy enough to support here.)

An alternative would be using perl -p -i -e instead of sed -i, but I
figured it was best to make the minimal working change.

Event Timeline

smeenai created this revision.Aug 28 2018, 12:16 PM
smeenai abandoned this revision.Aug 28 2018, 12:17 PM

Argh, why didn't Herald add the -commits list?

D51374 has the mailing list. Sorry for the noise.