From 7ba2fd0aec54c6c98c192dc7795fbda6c398d806 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Sat, 23 Jan 2021 00:33:58 +0100 Subject: [PATCH] bugfix: always rewrite all category records when updating card --- cards/update_card.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/cards/update_card.sh b/cards/update_card.sh index bf8bce1..b80e512 100755 --- a/cards/update_card.sh +++ b/cards/update_card.sh @@ -65,6 +65,7 @@ vcf_escape(){ vcf="$(pdi_load "$cardfile")" vcf="$(pdi_update_value "$vcf" N 1 "$(vcf_escape "$(POST 1N)" "$(POST 2N)" "$(POST 3N)" "$(POST 4N)" "$(POST 5N)")")" +vcf="$(printf '%s\n' "$vcf" |sed -E "/^CATEGORIES;[^:]*:.*$/d")" for field in $(POST_KEYS |grep -xE '[A-Z][A-Z0-9-]*'); do for cnt in $(seq 1 $(POST_COUNT "$field")); do -- 2.39.2