I've dowloaded SIMPLELINK-OPENOCD and tried to build it. Launching ./configure results in an error.
- With Zsh
% cd ./openocd/openocd % ./configure zsh: ./configure: bad interpreter: /bin/sh^M: no such file or directory %
- With bash
$ cd ./openocd/openocd $ ./configure bash: ./configure: bad interpreter: /bin/sh^M: no such file or directory $
According to Not able to execute a .sh file: /bin/bash^M: bad interpreter
This isn't a permission issue, you aren't getting a message about permissions/bin/bash^M: bad interpreter: No such file or directory
The script indicates that it must be executed by a shell located at
/bin/bash^M
. There is no such file: it's called/bin/bash
.The
^M
is a carriage return character. Linux uses the line feed character to mark the end of a line, whereas Windows uses the two-character sequence CR LF. Your file has Windows line endings, which is confusing Linux.Remove the spurious CR characters. You can do it with the following command:
sed -i -e 's/\r$//' create_mgw_3shelf_6xIPNI1P.sh
So I tried the recommended solution and dos2unix as well, to no avail.
Could you please release a clean package of SIMPLELINK-OPENOCD so it can be built on *nix?
Thank you!