Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8210318

idea.sh script doesn't work on Mac

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 12
    • 12
    • other-libs
    • 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.

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: