From 1ddf37b85b097f69a0d59f5a04f14509d1dd8ec0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Sun, 12 May 2024 17:48:40 +0200 Subject: [PATCH] bugfix: find actual UID in files --- ledgers/iban_assign.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)" -- 2.39.2