summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-11-13 22:14:53 +0100
committerErich Eckner <git@eckner.net>2021-11-13 22:14:53 +0100
commit17765e0ab1e55667adde66c997869787d51847e3 (patch)
tree490333aa7ab3be3d6ac982e71973a1bf4520cadd
parent99ddecacdbccd32dae5f99e2269eea9415026b6a (diff)
downloadcarddav-alpine-converter-17765e0ab1e55667adde66c997869787d51847e3.tar.xz
set IFS for reading, so we also get \t's
-rwxr-xr-xalpine-to-carddav4
1 files changed, 2 insertions, 2 deletions
diff --git a/alpine-to-carddav b/alpine-to-carddav
index 5d2938f..0948616 100755
--- a/alpine-to-carddav
+++ b/alpine-to-carddav
@@ -38,7 +38,7 @@ print_cnt() {
read_line() {
local line
- read -r line
+ IFS='' read -r line
for key in "${alpine_keys[@]}"; do
eval "${1}${key}"'="${line%%'"$(printf '\t')"'*}"'
eval 'line="${line#${'"${1}${key}"'}}"'
@@ -56,7 +56,7 @@ git -C "${git_dir}" diff -U0 -- addressbook \
1,/^+++/d
$ s#$#\n@@ #
' \
-| while read line; do
+| while IFS='' read -r line; do
case "${line}" in
'@@ '*)
for last_uid in "${last_uids[@]}"; do