From: Paul Hänsch Date: Sun, 12 May 2024 15:48:40 +0000 (+0200) Subject: bugfix: find actual UID in files X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=1ddf37b85b097f69a0d59f5a04f14509d1dd8ec0;p=confetti bugfix: find actual UID in files --- diff --git a/ledgers/iban_assign.sh b/ledgers/iban_assign.sh index 9faf223..8d9ae99 100755 --- a/ledgers/iban_assign.sh +++ b/ledgers/iban_assign.sh @@ -8,6 +8,7 @@ UIDLIST="$( | sed -Ez ' s/\nBEGIN;:VCARD\n([^\n]+\n)*FN;:([^\n]+)\n([^\n]+\n)*UID;:([^\n]+)\n([^\n]+\n)*END;:VCARD\n/UID:\4 FN:\2/g ' + echo )" # printf '%s\r\n' "Content-Type: text/plain" "" @@ -31,7 +32,8 @@ esac; done fn="$(POST "fn_${use}")" uid="${UIDLIST%% FN:"$fn"${BR}*}" uid="${uid##*${BR}UID:}" - cfile="${_DATA}/vcard/${uid}.vcf" + # cfile="${_DATA}/vcard/${uid}.vcf" + cfile="$(grep -lxF "UID;:${uid}" "${_DATA}/vcard/"*.vcf || grep -lxF "UID:${uid}" "${_DATA}/vcard/"*.vcf)" if SLOCK "$cfile" >/dev/null; then card="$(pdi_load "$cfile")" cnum="$(pdi_count "$card" X-IBAN)"