[go: up one dir, main page]

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

Make current directory evaluation in setup_viame.sh work outside of bash #116

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

russelldj
Copy link
Collaborator

I built VIAME but when I tried to source setup_viame.sh using zsh instead of bash, it failed because the $BASH_SOURCE variable is empty. Running bash setup_viame.sh runs without error, but does not export the required variables into the calling shell. ./setup_viame.sh fails at the substitution stage for the shell prompt.

I replaced $BASH_SOURCE with the more generic $0, which has worked for me on bash and zsh. I've been using zsh on linux, which I don't think is super common, but it is now the default shell for MacOS starting with Catalina so it seems useful to support.

@russelldj
Copy link
Collaborator Author

Both $BASH_SOURCE[0] and $0 fail when using the fish shell. It would be nice is there was a POSIX compliant solution but I feel like anyone using a non-standard shell like that can deal with the issue.

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

Successfully merging this pull request may close these issues.

1 participant