From: Paul Hänsch Date: Fri, 22 Jan 2021 23:33:58 +0000 (+0100) Subject: bugfix: always rewrite all category records when updating card X-Git-Url: https://git.plutz.net/?p=confetti;a=commitdiff_plain;h=7ba2fd0aec54c6c98c192dc7795fbda6c398d806 bugfix: always rewrite all category records when updating card --- 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