From ad56629f4093bd877254cfb870519db40f88d08a Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Thu, 1 Jun 2023 10:50:33 +0200 Subject: [PATCH] generate-font-image-previews: Fix various ShellCheck issues Signed-off-by: Fini Jastrow --- bin/scripts/generate-font-image-previews.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/scripts/generate-font-image-previews.sh b/bin/scripts/generate-font-image-previews.sh index 8749c54af..1557dbb82 100755 --- a/bin/scripts/generate-font-image-previews.sh +++ b/bin/scripts/generate-font-image-previews.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Nerd Fonts Version: 3.0.1 -# Script Version: 1.2.1 +# Script Version: 1.2.2 # Create font previews. # All fonts need to be installed (or no preview is generated) # Files should end up in the gh-pages branch @@ -27,9 +27,9 @@ main() { continue fi - if $( fc-list -q "${imagePreviewFont}:charset=41" ); then + if fc-list -q "${imagePreviewFont}:charset=41" ; then 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" else echo "[Missing] $imagePreviewFont" @@ -56,6 +56,7 @@ generate_preview_symbols() { # svgo "${output_dir}${font}.svg" } +# shellcheck disable=SC2034 # used by commented out code (on demand) image_font_files=( \ '3270/Regular/3270NerdFont-Regular.ttf' \ 'Agave/AgaveNerdFont-Regular.ttf' \