azukiapp / azk

azk is a lightweight open source development environment orchestration tool. Instantly & safely run any environment on your local machine.
http://azk.io
Apache License 2.0
898 stars 63 forks source link

Remove bashisms from `shared/scripts/install.sh` script #578

Closed fearenales closed 8 years ago

fearenales commented 8 years ago

The easiest way to install azk is by running shared/scripts/install.sh script, which can be accessible via http://azk.io/install.sh

In azk docs, there are instructions to download the script and pipe it to bash, since the script is intended to be run using bash (you can see #!/bin/bash on its first line).

However, if the user pipes it to any other shell (| sh, as instance), it'll break due to syntax error. To fix it, all bashisms have to be removed from the installation script.

Plus, the documentation have to be updated in order to indicate the use of sh as the shell to be used.

nuxlli commented 8 years ago

Good proposal, but I think important to note a few things:

nuxlli commented 8 years ago

A good reference on these issues is that script, used by the team http://basho.com in packaging their products based Erlang.

fearenales commented 8 years ago

@nuxlli Good points! I personally don't think it's bad to keep bin/azk using bash. That's pretty ok, once the user doesn't have to worry about it. Imho, bin/azk can be kept as it is.

My point is regard the installation script (shared/scripts/install.sh). It has to be piped into a shell. In azk docs, bash is used. But there are no guarantees that the user will pipe it into some other shell. And would be great if it worked, not a creepy syntax error be popped in screen, do you agree?

nuxlli commented 8 years ago

Yep, that makes sense.

For now I think we can focus on improving the install.sh script, but keep open the idea of making ./bin/azk more agnostic.

fearenales commented 8 years ago

Cool! :)