The migration script to version 1.0 (https://github.com/spring-projects/spring-hateoas/blob/master/etc/migrate-to-1.0.sh) fails when I run it on my macOS machine (Mojave 10.14.6) with the error message sed: 1: "s/Link\.REL_SELF/IanaLi ...": unterminated substitute pattern repeated for each file matching the pattern.
Same for me on macOS 10.14.5.
I'll let @odrotbohm deal with sed errors.
On linux it failed too with sed: can't read : No such file or directory.
I had to change the sed command to sed -i -e "$EXPRESSION" $FILE
Thanks @mgaceanu for your valuable advice! It saved me a lot of time!
I had the same problem on MacOS. Seems that the EXPRESSION string is too long for Mac-sed. If I run the script with the second half of the EXPRESSION commented out (make sure you terminate the EXPRESSION properly) it runs without problem. Then repeat with only the first half of EXPRESSION commented out.
My application still needs a lot of manual changes after running the script though...
Hey, any update on this?
I also ran into same issue on mac. thanks to cdlans for figuring out the problem. I modified the script and split the expression into EXPRESSION1 AND EXPRESSION2 each with 32 lines. and then give -e "$EXPRESSON1" -e"$EXPRESSION2" to the sed
I managed to do it in a docker container with @mgaceanu suggestion and it worked.
$ docker run --rm -it -v (pwd):/tmp/my-repo ubuntu:21.04
$ cd tmp/my-repo
$ ./migrate-to-1.0.sh
Worked like a charm :)
Most helpful comment
On linux it failed too with sed: can't read : No such file or directory.
I had to change the sed command to
sed -i -e "$EXPRESSION" $FILE