1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2025-01-25 03:32:02 +02:00

i_all: Warn and fail on glyphname duplicates

[why]
We need the glyphnames to be unique, or some glyphs will not be
accessible later (in the cheat sheet, css, glyphnames).

[note]
Also already remove one non-effective duplicate that is first an alias
and later a real glyph in i_seti.sh

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2024-03-17 15:11:19 +01:00
parent 2fa45981ee
commit da502d23a2
2 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Nerd Fonts Version: 3.1.1
# Script Version 1.2.0
# Script Version 1.3.0
# Usually this is called without argument. If the first argument
# is 'include-old-material' the old material design icons will be
@ -15,6 +15,12 @@ fi
for set in "${sets[@]}"; do
i="${base}/i_${set}.sh"
dups=$(grep ' i_' "$i" | sed 's/.* i_//;s/=.*//' | sort | uniq -D | wc -l)
if [ "$dups" -gt 0 ]; then
echo "Found duplicate glyph names in ${i}"
grep ' i_' "$i" | sed 's/.* i_//;s/=.*//' | sort | uniq -D
exit 1
fi
# shellcheck disable=SC1090 # We check the sources individually
test -f "$i" -a -r "$i" && source "$i"
done

View File

@ -40,8 +40,6 @@
022 i_seti_gulp gulp.svg
023 i_seti_grunt grunt.svg
024 i_custom_default file_nf.svg
024 i_seti_default
024 i_seti_text
025 i_seti_folder folder.svg
026 i_seti_css css.svg
027 i_seti_config config.svg
@ -114,6 +112,7 @@
082 i_seti_dart dart.svg
083 i_seti_db db.svg
084 i_seti_default default.svg
084 i_seti_text
085 i_seti_deprecation_cop deprecation-cop.svg
086 i_seti_docker docker.svg
087 i_seti_d d.svg

Can't render this file because it has a wrong number of fields in line 13.