wurmlab / flo

Same species annotation lift over pipeline.
96 stars 28 forks source link

Redefine sh to exit more gracefully if command not found. #7

Open yeban opened 7 years ago

cmatKhan commented 3 years ago

Yes -- agreed. I quickly figured out that I needed to run this with bash, but the error when run from the zsh shell is this:

~/projects/flo/flo_crypto                                                                                                                                                                           8s Py ruby_env
❯ ../flo/scripts/install.sh 
../flo/scripts/install.sh: 3: ../flo/scripts/install.sh: Syntax error: "(" unexpected

would be nice to see a error like: "run me with bash"

yeban commented 3 years ago

Works with zsh here. The error looks like the script was invoked with sh, which would not recognise the array on line 3. I suppose that can happen if zsh is not your login shell and sh is. Maybe the script should specify a shebang line on top: #!/bin/bash. Feel free to test the idea and send a pull request.