-
Notifications
You must be signed in to change notification settings - Fork 14
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
Makefile rule to create a sourceable version so that internals can be re-used. #10
Comments
Another possibility is to wrap the code outside a function into a function and call it if a certain predicate is satisfied. This way we can have the same file for both purposes: # all the helpers
...
# code which is now in the "root"
main() { ... }
if ! ${FLK_SOURCEABLE:-false}; then
main "$@"
fi |
If someone submits a PR for this I will merge it. |
https://stackoverflow.com/questions/2683279/how-to-detect-if-a-script-is-being-sourced
|
Hey @denisidoro I've pushed a new version of |
I can't test it right now but It seems to cover my needs. Thanks! |
No description provided.
The text was updated successfully, but these errors were encountered: