codyopel / collide

Automatically exported from code.google.com/p/collide
Apache License 2.0
0 stars 0 forks source link

lib/vertx/bin/vertx not compatible with 'dash' on debian. #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ./collide

What is the expected output? What do you see instead?
I see this:
./lib/vertx/bin/vertx: 40: [: run: unexpected operator
./lib/vertx/bin/vertx: 40: [: bootstrap.js: unexpected operator
./lib/vertx/bin/vertx: 40: [: -conf: unexpected operator
./lib/vertx/bin/vertx: 40: [: /tmp/collide.IYz3DmLjPq: unexpected operator
./lib/vertx/bin/vertx: 40: [: -cp: unexpected operator
./lib/vertx/bin/vertx: 40: [: 
.:./lib/gwt-user.jar:./lib/collide-server.jar:./lib/guava-12.0.jar:./lib/gson-2.
2.1.jar:./lib/jsr305.jar:./lib/org.eclipse.jgit-1.3.0.201202151440-r.jar:./lib/w
aveinabox-import-0.3.jar: unexpected operator

What version of the product are you using? On what operating system?
2012-07-07, debian linux

Please provide any additional information below.
If you change the first line of the script to #!/bin/bash then the script runs 
normally. Debian uses 'dash' instead of 'bash' for /bin/sh and the script uses 
a bash-specific behaviour to work.

Original issue reported on code.google.com by step...@thorne.id.au on 10 Jul 2012 at 8:34

GoogleCodeExporter commented 9 years ago
Stephen, I read that dash wants the equality operator to be '=' instead of 
'=='.  Can you try that out and confirm, rather than changing the shell to bash?

http://code.google.com/p/collide/source/browse/deps/vert.x-1.1.0.final/bin/vertx

Go to line 40, make it a single '=', see if it runs in dash.

Original comment by dragonsinth on 11 Jul 2012 at 4:39

GoogleCodeExporter commented 9 years ago

Original comment by dragonsinth on 11 Jul 2012 at 4:46

GoogleCodeExporter commented 9 years ago
It's not just the vertx script that doesn't work with dash (but works with 
bash). The main collide launcher (when provided a password like -password=1234) 
complains of ./collide: 12: ./collide: Bad substitution

I fixed both by switching the shell to bash too.

Original comment by jtolds on 15 Jul 2012 at 7:49

GoogleCodeExporter commented 9 years ago
Switching our own script to bash shouldn't be too big a deal.

Original comment by dragonsinth on 17 Jul 2012 at 3:19