Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasabi.sh and container.sh require bash 4.x #49

Closed
shoeffner opened this issue Jul 21, 2016 · 1 comment
Closed

wasabi.sh and container.sh require bash 4.x #49

shoeffner opened this issue Jul 21, 2016 · 1 comment
Labels

Comments

@shoeffner
Copy link
Member

shoeffner commented Jul 21, 2016

When running ./bin/wasabi.sh start:cassandra,mysql (or any other start sequence) I get syntax errors:

./bin/wasabi.sh: line 317: syntax error near unexpected token `&'
./bin/wasabi.sh: line 317: `    start) command="start:cassandra,mysql,wasabi";&'

I am using zsh (version 5.2) but also tried to run it with the vanilla OSX bash shell (version 3.2.57(1)-release from 2007), same error applies. Neither bash 3.2 nor zsh 5.0.8 support ;& as fall through, only bash 4(.3 linked).

It's not only wasabi.sh but also in container.sh.

The problem is also described on stackoverflow. To make the script more portable, consider portability and POSIX compliance.

For now I will be using an older script (git checkout origin/feature/experiment_pagination -- ./bin/wasabi.sh ./bin/container.sh).

Update: To use the script with zsh one has to do it explicitly: zsh ./bin/wasabi.sh thanks to the shebang line. However == still causes problems then. So it is probably the best idea to get bash 3.2 upgraded automatically.

Update 2: After posting this issue to the zsh mailing list Bart Schäfer recommended in a private mail to use the following: ARGV0=sh zsh wasabi.sh, which seems to solve the problems. I will now alias this in my rc file.
However that doesn't solve the bash 3.2 issue, so I will leave this open for now.

@shoeffner
Copy link
Member Author

After the recent rollback, this is no longer a real issue. But the scripts are under surveillance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant