Allow running gotta-patch-em-all from any dir #863
Merged
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.
Description
The
gotta-patch-em-all-font-patcher!.shassumes that it's being run from insidebin/scripts, by setting source and target directories according to the output ofpwd.That's not super obvious from the outside. When I tried running it, I didn't know and tried running it from the root dir. That didn't cause an error, but instead the script simply didn't find any fonts.
Now it sets the directories relative to the script directory, which allows running it from anywhere.
What does this Pull Request (PR) do?
Added one line plus comment to the script, to set the script directory (var
sd). Then changed the two instances of${PWD}to instead use${sd}.How should this be manually tested?
Run the script from inside or outside
bin/scripts, see if it works. I'm currently running it from the root dir, and it's working fine so far.