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

Use more portable way of referring to bash #200

Merged
merged 4 commits into from Dec 29, 2021
Merged

Use more portable way of referring to bash #200

merged 4 commits into from Dec 29, 2021

Conversation

tmiw
Copy link
Collaborator

@tmiw tmiw commented Dec 26, 2021

Updates build scripts to be able to refer to bash regardless of its location. Resolves #199.

@tmiw
Copy link
Collaborator Author

tmiw commented Dec 28, 2021

@drowe67, does this work for you?

@drowe67
Copy link
Owner

drowe67 commented Dec 28, 2021

Nice one @tmiw - I just checked and build_linux.sh was busted for me too (Ubuntu 20). Can you pls tell me what /usr/bin/env bash does?

I've tweaked the script a little so it doesn't break when codec2 and LPCNet have already been cloned.

@tmiw
Copy link
Collaborator Author

tmiw commented Dec 29, 2021

Nice one @tmiw - I just checked and build_linux.sh was busted for me too (Ubuntu 20). Can you pls tell me what /usr/bin/env bash does?

I've tweaked the script a little so it doesn't break when codec2 and LPCNet have already been cloned.

env uses PATH to search for the location of its first argument and executes the first one it finds. From the env man page for reference:

ENVIRONMENT
     The env utility uses the PATH environment variable to locate the requested utility if the name contains no ‘/’ characters,
     unless the -P option has been specified.

@drowe67
Copy link
Owner

drowe67 commented Dec 29, 2021

Thanks @tmiw when I man env I don't see have that line, so thanks for explaining that feature. It is interesting that distros are messing with the location of shells, bash must have been in /bin for decades 🤔

I'm OK for you to merge whenever you like.

@tmiw
Copy link
Collaborator Author

tmiw commented Dec 29, 2021

Thanks @tmiw when I man env I don't see have that line, so thanks for explaining that feature. It is interesting that distros are messing with the location of shells, bash must have been in /bin for decades 🤔

I'm OK for you to merge whenever you like.

Sounds good.

@tmiw tmiw merged commit d9473a7 into master Dec 29, 2021
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.

"/usr/bin/bash" or "/bin/bash" for ./build_linux.sh
2 participants