X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=cards%2Fupdate_card.sh;h=4ae9c19dc3426eac411779585d9712f6d5ca5b74;hp=bf8bce170698a24fd0ed914a7945160b86616500;hb=a6e3da877a73be739ac96b12d9cde2190b24a423;hpb=e371e98650cfda4c30865306d0f10949794911c9 diff --git a/cards/update_card.sh b/cards/update_card.sh index bf8bce1..4ae9c19 100755 --- a/cards/update_card.sh +++ b/cards/update_card.sh @@ -1,6 +1,6 @@ -#!/bin/zsh +#!/bin/sh -# Copyright 2014, 2016, 2019, 2020 Paul Hänsch +# Copyright 2014, 2016, 2019, 2020, 2021 Paul Hänsch # # This file is part of Confetti. # @@ -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