-
Bug
-
Resolution: Fixed
-
P3
-
12
-
None
-
b11
The new idea.sh script doesn't work on Mac:
sed: 1: "/Users/xyz/hg/jdk/. ...": invalid command code m
sed: 1: "/Users/xyz/hg/jdk/. ...": invalid command code m
sed: 1: "/Users/xyz/hg/jdk/. ...": invalid command code m
...
There are two issues, all related to 'sed':
1) MacOs version of 'sed' doesn't support the -i option to replace a file inline. While it is possible to feed the -i option with an empty backup extension, as in -i '', the syntax in linux and macos is divergent (linux wants the extension to follow -i w/o spaces, while Mac wants a space). Therefor, better to drop -i entirely and move files around using /tmp.
2) MacOs version of 'sed' doesn't like newlines inside replacement text. While there are workarounds for this, the newline generated by the script were mostly cosmetic, so it can be left out.
sed: 1: "/Users/xyz/hg/jdk/. ...": invalid command code m
sed: 1: "/Users/xyz/hg/jdk/. ...": invalid command code m
sed: 1: "/Users/xyz/hg/jdk/. ...": invalid command code m
...
There are two issues, all related to 'sed':
1) MacOs version of 'sed' doesn't support the -i option to replace a file inline. While it is possible to feed the -i option with an empty backup extension, as in -i '', the syntax in linux and macos is divergent (linux wants the extension to follow -i w/o spaces, while Mac wants a space). Therefor, better to drop -i entirely and move files around using /tmp.
2) MacOs version of 'sed' doesn't like newlines inside replacement text. While there are workarounds for this, the newline generated by the script were mostly cosmetic, so it can be left out.