1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2025-01-06 21:49:40 +02:00

On check-font runs, place docu in correct tree

[why]
When we run gotta-patch-em with -c the font files and the licenses will
end up in check-fonts/ and not in patched_fonts/.

Since gotta-patch-em calls standardize to add the readmes, the readmes
will always end up in patched_fonts/, even on check runs.

[how]
Add option to standardize, that transports the destrination tree root.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2023-04-28 12:00:45 +02:00
parent 36f8d762a6
commit 354eca5e77
2 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Nerd Fonts Version: 3.0.0
# Script Version: 1.4.0
# Script Version: 1.4.1
#
# You can supply options to the font-patcher via environment variable NERDFONTS
# That option will override the defaults (also defaults of THIS script).
@ -307,7 +307,7 @@ function generate_info {
if [ "$last_font_root" != "$font_root" ]
then
echo "$LINE_PREFIX --- Calling standardize-and-complete-readmes for $font_root"
./standardize-and-complete-readmes.sh "$font_root"
./standardize-and-complete-readmes.sh "$font_root" "$patched_parent_dir"
echo "$LINE_PREFIX ---"
last_font_root=$font_root
fi

View File

@ -40,7 +40,7 @@ function clearDestination {
true > "$to" 2> /dev/null
}
if [ $# -eq 1 ]; then
if [ $# -ge 1 ]; then
like_pattern="./$1"
# allows one to limit to specific font.
# e.g. with ProFont, DejaVuSansMon, Hasklig, Hack, Gohu, FiraCode, Hermit, etc.
@ -49,6 +49,10 @@ else
like_pattern="."
echo "$LINE_PREFIX No parameter pattern given, generating standardized readmes for all fonts in all font directories"
fi
if [ $# -ge 2 ]; then
patched_parent_dir=$2
echo "$LINE_PREFIX Using destination '${patched_parent_dir}'"
fi
find "$like_pattern" -type d |
while read -r filename
@ -88,7 +92,7 @@ do
mapfile -t RST < <(find "$searchdir" -type f -iname 'readme.rst')
mapfile -t TXT < <(find "$searchdir" -type f -iname 'readme.txt')
mapfile -t MD < <(find "$searchdir" -type f -iname 'readme.md')
outputdir=$PWD/../../patched-fonts/$filename/
outputdir=$PWD/../../${patched_parent_dir}/$filename/
echo "$LINE_PREFIX Generating readme for: $filename"