Related Linear issue here. This is part of a set of diffs that will allow ShellCheck to be added to the CI. See inline comments for specific details of the ShellCheck error/warning output.
Not even sure if this script is used anywhere, since I searched the entire codebase and didn't find a usage of setup.sh. But it's blocking adding ShellCheck to the CI, so it was updated.