Fix various otf/ttf globs

[why]
I'm not sure why it has been in the code like this, and I removed these
strange globs already before in some places [1].

find -name "*.[o,t]tf"

actually allows
  *.otf
  *.ttf
  *.,tf

[how]
Remove spurious comma in all `find` calls.
Systematically.

[note]
Just some commits mentioned here:
  2ace3de8
  e7722458
  821ac681
  7bc729e2

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2023-01-26 08:21:28 +01:00
parent 643cf84240
commit 10f43c7b95
4 changed files with 5 additions and 5 deletions

View file

@ -233,7 +233,7 @@ while read -r filename; do
FONTS=() FONTS=()
while IFS= read -d $'\0' -r file; do while IFS= read -d $'\0' -r file; do
FONTS=("${FONTS[@]}" "$file") FONTS=("${FONTS[@]}" "$file")
done < <(find "$searchdir" -type f -iwholename '*complete*' \( -iname '*.[o,t]tf' ! -wholename '*Windows Compatible*' \) -print0 | sort -z) done < <(find "$searchdir" -type f -iwholename '*complete*' \( -iname '*.[ot]tf' ! -wholename '*Windows Compatible*' \) -print0 | sort -z)
outputdir=$PWD/../casks outputdir=$PWD/../casks

View file

@ -51,7 +51,7 @@ do
while IFS= read -d $'\0' -r file ; do while IFS= read -d $'\0' -r file ; do
FONTS=("${FONTS[@]}" "$file") FONTS=("${FONTS[@]}" "$file")
# limit to first variation of family (folder) # limit to first variation of family (folder)
done < <(find "$searchdir" -type f -iname '*.[o,t]tf' -print0) done < <(find "$searchdir" -type f -iname '*.[ot]tf' -print0)
#done #done
for font in "${FONTS[@]}"; do for font in "${FONTS[@]}"; do

View file

@ -364,7 +364,7 @@ function copy_license {
# cp "$license_file" "$dest" # makes archiving multiple harder when we junk the paths for the archive # cp "$license_file" "$dest" # makes archiving multiple harder when we junk the paths for the archive
[[ -d "$dest/complete" ]] || mkdir -p "$dest/complete" [[ -d "$dest/complete" ]] || mkdir -p "$dest/complete"
cp "$license_file" -t "$dest/complete" cp "$license_file" -t "$dest/complete"
done < <(find "$src" -iregex ".*\(licen[c,s]e\|ofl\).*" -type f -print0) done < <(find "$src" -iregex ".*\(licen[cs]e\|ofl\).*" -type f -print0)
} }
# Re-generate all the readmes # Re-generate all the readmes
@ -416,7 +416,7 @@ then
# some of the source font files in that directory. # some of the source font files in that directory.
last_source_dir=${current_source_dir} last_source_dir=${current_source_dir}
num_to_patch=$(find "${current_source_dir}" -iregex ${like_pattern} -type f | wc -l) num_to_patch=$(find "${current_source_dir}" -iregex ${like_pattern} -type f | wc -l)
num_existing=$(find "${current_source_dir}" -iname "*.[o,t]tf" -o -iname "*.sfd" -type f | wc -l) num_existing=$(find "${current_source_dir}" -iname "*.[ot]tf" -o -iname "*.sfd" -type f | wc -l)
if [ ${num_to_patch} -eq ${num_existing} ] if [ ${num_to_patch} -eq ${num_existing} ]
then then
purge_destination="TRUE" purge_destination="TRUE"

View file

@ -179,7 +179,7 @@ implode find_dirs "\" \"" "${nerdfonts_dirs[@]}"
find_dirs="\"$find_dirs\"" find_dirs="\"$find_dirs\""
# Put it all together into the find command we want # Put it all together into the find command we want
find_command="find $find_dirs \\( \\( -name '*.[o,t]tf' -or -name '*.pcf.gz' \\) $find_include $find_exclude \\) -type f -print0" find_command="find $find_dirs \\( \\( -name '*.[ot]tf' -or -name '*.pcf.gz' \\) $find_include $find_exclude \\) -type f -print0"
# Find all the font files and store in array # Find all the font files and store in array
files=() files=()