Provide stripped values too

This commit is contained in:
David Heinemeier Hansson
2026-01-01 12:33:45 -07:00
parent ff9474e0eb
commit 01135724d4
2 changed files with 2 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ if [[ -f $COLORS_FILE ]]; then
# Parse TOML using yq (treating it as YAML since the flat key=value structure is compatible)
# We convert 'key = value' to 'key: value' to make it valid YAML, then use yq/jq to generate the replacement commands.
sed_script=$(mktemp)
sed 's/=/:/' "$COLORS_FILE" | yq -r 'to_entries[] | "s|{{ \(.key) }}|\(.value)|g"' > "$sed_script"
sed 's/=/:/' "$COLORS_FILE" | yq -r 'to_entries[] | "s|{{ \(.key) }}|\(.value)|g", "s|{{ \(.key)_strip }}|\(.value | sub("^#";""))|g"' > "$sed_script"
shopt -s nullglob
for tpl in "$TEMPLATES_DIR"/*.tpl; do