Closed FlorianFranzen closed 6 years ago
Hi!
I was kind of aware of the issue and my messy scripting (which will cause zsh not to interpret in a correct way).
I'm using zsh myself but I don't know why it runs it as bash (possibly tries to run it as "sh" which is linked to "bash").
The lack of shebang is needed for Windows/Linux trickery to work. Perhaps the best is to split the scripts into Windows and Linux version as they're separate anyway.
L.
+1 to split, mixed code is not better for debugging...
Code split into Windows (.cmd
) and Linux (.sh
) parts. Linux contains explicit shebang for bash (#!/usr/bin/env bash
).
If I run the script from my shell "Z shell" (zsh) I get the following error message.
As I get the same error when run in a posix shell, I assume this might be due to the use of bashisms.
The quick fix is to either add
#!/bin/bash
to the top of the file (which might break Windows support) or to run the script in bash withbash -c ./gear360pano ...
.Alternatively one could also make the script fully posix compliant.
I am happy with the first fix and mostly want to document this error and fix.