报错:
./install-oatpp-modules.sh: 17: Syntax error: “(” unexpected
解决办法
将
#!/bin/sh
改为
#!/bin/bash
或
将
#!/bin/bash
改为
#!/bin/sh
报错原因
The function keyword is supported in many modern shells, including Bash, which is an extended version of the Bourne Shell. If your script is intended to be executed with Bash, you can change the shebang (the first line of your script) to use Bash explicitly.