Commit a848611
committed
Build: Make the sed usage portable across Linux & macOS
On macOS (which uses the BSD-variant of sed), the `-i` flag requires its
“backup extension” to come immediately after the i (with a space), even if
it’s empty; this made the release `sed` commands fail on macOS. The GNU sed
doesn’t require an extension but it allows it.
To make the commands work both on macOS & Linux, make the following changes:
1. Always specify the backup extension.
2. Explicitly specify the script part by using the `-e` flag.
3. To simplify the patterns, use `|` as a separator instead of `/`; then
slashes don't need to be escaped in the script parts.1 parent 3f79644 commit a848611
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
0 commit comments