GaloisInc / saw-script

The SAW scripting language.
BSD 3-Clause "New" or "Revised" License
442 stars 63 forks source link

`build.sh` script fails with `dash` (`Syntax error: "(" unexpected`) #2100

Closed RyanGlScott closed 3 months ago

RyanGlScott commented 3 months ago

After the changes in https://github.com/GaloisInc/saw-script/pull/2066, running build.sh as a script fails with:

$ ./build.sh 
./build.sh: 8: Syntax error: "(" unexpected

Note that I am running on Ubuntu 22.04, where sh is symlinked to dash.

ShellCheck has the following to say about build.sh:

$ shellcheck build.sh 

In build.sh line 8:
function install() {
^-- SC2112 (warning): 'function' keyword is non-standard. Delete it.

And indeed, the script runs without issue if I change function install() to simply install().

cc @sauclovian-g