[why]
We can limit the font files to patch with the gotta-patch-em-all script
to some specific file names; the case insensitive beginning of the
basename of the font file, to be specific.
Sometimes we do not know how the actual font files are named, we just
know the directory name.
[how]
The old filter checked for the beginning of a file name, so we keep this
behavior and allow to check for the beginning of a directory name.
As differentiator the first character of the passed filter is used. As a
slash is not allowed in the file name filters: If the first char is a
slash, we search for font files in a directory that begins with that
name. The file name is not considered in this case.
Examples:
gotta-patch-em-all-font-patcher!.sh Fira
Patches all font files that begin (case insensitive) with 'fira'.
It must be the basename of the font file, the path to the file is not
considered. (Old behavior.)
Translated to a glob this is roughly **/Fira*.[ot]tf
gotta-patch-em-all-font-patcher!.sh /Fira
Patches all font files that are in directories that begin (case
insensitive) with 'fira'. It can not be the beginning of the font
file basename.
Translated to a glob this is roughly **/Fira*/**/*.[ot]tf
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When we do CI we probably want to raise an error if no font file could
be found.
[how]
Check how many font files have been generated and return with exit
code 1 if the number is zero.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
The script assumes that it's run from inside bin/scripts, by setting source and target directories according to the output of pwd. It doesn't perform any checks whether it's run from the right directory, so it just doesn't find the fonts if the working directory is different.
Now it sets the directories relative to the script directory.
- fixes missing readme at root dir of each font
- adds addendum clarifying reserved font names
- adds readme even if source font folder has none
- fixes parent directory re-build