https://www.tachytelic.net/2019/01/grep-recursively/
During testing, I tried simply replacing grep with ggrep, which was non-portable but worked fine. Using an environment variable with os.getenv set to 'g' also worked, but the problem with that approach is that you have to set it manually and some times the script will mess up if you don't explictly define it to an empty string for platforms that don't need it.
Setting TOOLCHAIN_PREFIX to 'g' seemed to solve all of my problems except this one, and it appears to be the only non-portable use of GNU grep in the whole tree. To understand what I tried to do here, let me present with you with two commands that yield the same output on my machine:
find . -name '*.xul' | xargs grep -E "#include"
ggrep -E -r "#include" --include="*.xul" .
I just tried to make the Python script follow the logic of those two commands, though I'm not sure how well I succeeded since I got no errors. I visualized everything this way:
ggrep -E -r "<strings>" --include="<filesuffixes>" <path>
find <path> -name '<filesuffixes>' | xargs grep -E "<strings>"
And arranged it all accordingly to the best of my ability, though I should point out that Python is not my strong suit.
This repository holds the code for a unified application platform for XUL-based
applications. It is a hard fork from the Mozilla code repository (mozilla-central)
with an ESR-52 fork point.
In addition to further development based on the Mozilla upstream code, and
selective cherry-picking of directly-applicable patches, this repository has its
own development and holds the base for a future platform to be used by XUL
applications.
This repository will contain at least one application to demonstrate and make use
of the platform: The Basilisk web browser, a close twin to Mozilla's Firefox.
Additional documentation
Additional documentation relevant to this source code can be found in the /docs
directory. This will contain relevant documentation regarding contributing,
using and distributing this code and its binaries.
If you are interested in the development and building side of things, some
information will be available on the Pale Moon developer wiki.
A note about trademarks and branding
Although this repository is licensed under Mozilla Public License v2.0, the
trademarks and brands contained herein remain the property of their respective
owners. For more details, please see the notifications in the respective directories.
Foundation and maintainership
This repository has been founded and is maintained by Moonchild (M.C. Straver).
If you fork this repository to perform your own work on it, please consider
offering improvement patches upstream to its origin to mutually improve the
platform and build a future for XUL.