🚀 feat: Upgrade Makefile for better compability with manpath #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello folks!
I'm just sending this changes to fix a little problem I had when building the project from source.
Looks like we were using hard-coded path values for man1... 🤔
What happens is, in some machines the man paths may vary (in my case, for example, it is located at
/usr/share/man
).So I added some logic to try to dynamically find the
man1
file in our system 🔍Now it looks just great, and it's no longer breaking in my system when building from source! 🎉 I hope that works in your computer as well haha
So, what I'm doing is getting the man's path variable with the command
manpath
. This command will generate a simple PATH string like this:/usr/local/man:/usr/local/share/man:/usr/share/man
. So I split it by:
and try to find the correct directory inside each path. Then, set the variable, and do all the stuff...That's it! 🚀