chore: add back inline docs for gfonts download (#187)
Co-authored-by: fiftydinar <65243233+fiftydinar@users.noreply.github.com>
This commit is contained in:
parent
1c454dc931
commit
c6f522e786
1 changed files with 5 additions and 2 deletions
|
|
@ -14,8 +14,11 @@ for FONT in "${FONTS[@]}"; do
|
|||
mkdir -p "${DEST}/${FONT}"
|
||||
|
||||
readarray -t "FILE_REFS" < <(
|
||||
if output=$(curl -s "https://fonts.google.com/download/list?family=${FONT// /%20}" | tail -n +2); then
|
||||
if FILE_REFS=$(echo "$output" | jq -c '.manifest.fileRefs[]' 2>/dev/null); then
|
||||
if JSON=$(
|
||||
curl -s "https://fonts.google.com/download/list?family=${FONT// /%20}" | # spaces are replaced with %20 for the URL
|
||||
tail -n +2 # remove first line, which as of March 2024 contains ")]}'" and breaks JSON parsing
|
||||
); then
|
||||
if FILE_REFS=$(echo "$JSON" | jq -c '.manifest.fileRefs[]' 2>/dev/null); then
|
||||
echo "$FILE_REFS"
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue