1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-19 20:12:52 +02:00

generate-font-image-previews: Fix various ShellCheck issues

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2023-06-01 10:50:33 +02:00
parent 06ba2a8a28
commit ad56629f40

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Nerd Fonts Version: 3.0.1 # Nerd Fonts Version: 3.0.1
# Script Version: 1.2.1 # Script Version: 1.2.2
# Create font previews. # Create font previews.
# All fonts need to be installed (or no preview is generated) # All fonts need to be installed (or no preview is generated)
# Files should end up in the gh-pages branch # Files should end up in the gh-pages branch
@ -27,9 +27,9 @@ main() {
continue continue
fi fi
if $( fc-list -q "${imagePreviewFont}:charset=41" ); then if fc-list -q "${imagePreviewFont}:charset=41" ; then
generate_preview "$imagePreviewFont" "$patchedName Nerd Font" generate_preview "$imagePreviewFont" "$patchedName Nerd Font"
elif $( fc-list -q "${imagePreviewFont}" ); then elif fc-list -q "${imagePreviewFont}" ; then
generate_preview_symbols "$imagePreviewFont" "$patchedName Nerd Font" generate_preview_symbols "$imagePreviewFont" "$patchedName Nerd Font"
else else
echo "[Missing] $imagePreviewFont" echo "[Missing] $imagePreviewFont"
@ -56,6 +56,7 @@ generate_preview_symbols() {
# svgo "${output_dir}${font}.svg" # svgo "${output_dir}${font}.svg"
} }
# shellcheck disable=SC2034 # used by commented out code (on demand)
image_font_files=( \ image_font_files=( \
'3270/Regular/3270NerdFont-Regular.ttf' \ '3270/Regular/3270NerdFont-Regular.ttf' \
'Agave/AgaveNerdFont-Regular.ttf' \ 'Agave/AgaveNerdFont-Regular.ttf' \