From f6d07c6938124fb18573ca5481c8e1ab6bd69980 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Mon, 18 Jul 2022 17:54:31 +0200 Subject: [PATCH] [DNM] Always put name in json Change-Id: I0ac9a1c632fa0e2ac98898cdbaf4caa3aed4308e --- generate_themes.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/generate_themes.sh b/generate_themes.sh index b7efa30821..9274d8ee08 100755 --- a/generate_themes.sh +++ b/generate_themes.sh @@ -186,6 +186,9 @@ function generate_accent() { local color_dk="$3" local color_presence="$4" local name_str="$5" + if [ -z "$name_str" ]; then + name_str="$name" + fi if [ -z "$color_presence" ]; then color_presence_lt="?colorAccent" color_presence_dk="?colorAccent" @@ -196,9 +199,7 @@ function generate_accent() { echo " {" ( echo " \"id\": \"$name\"," - if [ ! -z "$name_str" ]; then - echo " \"name\": \"$name_str\"," - fi + echo " \"name\": \"$name_str\"," echo " \"accent_light\": \"$color_lt\"," echo " \"accent_dark\": \"$color_dk\"," if [ ! -z "$color_presence" ]; then