1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2025-01-06 21:49:40 +02:00

gotta-patch-em-all: Fix config_has_powerline

[why]
There is code that shall read the config file and act on
config_has_powerline.

Usually it is set to "1", but Ubuntu has this "0".

Regardless the content, if the variable has content the code assumes the
value is true. That is probably not wanted.

[how]
Use a numeric comparison.

[note]
```
git blame UbuntuMono/config.cfg
4abe6c77b0 Ubuntu/Bold-Italic/config.cfg (Ryan L McIntyre 2017-07-23 17:17:21 -0400 1) config_has_powerline=0
```

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2022-10-12 10:01:06 +02:00
parent fc22acc3e3
commit 4bca7849fe

View File

@ -127,7 +127,7 @@ function patch_font {
# shellcheck disable=SC2154
# we know the '$config_has_powerline' is from the sourced file
if [ "$config_has_powerline" ]
if [ "$config_has_powerline" -gt 0 ]
then
powerline=""
combinations=$(printf "./font-patcher ${f##*/} %s\\n" {' --use-single-width-glyphs',}{' --windows',}{' --fontawesome',}{' --octicons',}{' --fontlogos',}{' --pomicons',}{' --powerlineextra',}{' --fontawesomeextension',}{' --powersymbols',}{' --weather',}{' --material',})
@ -193,7 +193,7 @@ function generate_info {
source "$config_parent_dir/config.cfg"
fi
if [ "$config_has_powerline" ]
if [ "$config_has_powerline" -gt 0 ]
then
powerline=""
combinations=$(printf "./font-patcher ${f##*/} %s\\n" {' --use-single-width-glyphs',}{' --windows',}{' --fontawesome',}{' --octicons',}{' --fontlogos',}{' --pomicons',}{' --powerlineextra',}{' --fontawesomeextension',}{' --powersymbols',}{' --weather',}{' --material',})