summaryrefslogtreecommitdiff
path: root/alpine-to-carddav
diff options
context:
space:
mode:
Diffstat (limited to 'alpine-to-carddav')
-rwxr-xr-xalpine-to-carddav12
1 files changed, 6 insertions, 6 deletions
diff --git a/alpine-to-carddav b/alpine-to-carddav
index 0766f35..5d2938f 100755
--- a/alpine-to-carddav
+++ b/alpine-to-carddav
@@ -6,7 +6,7 @@ if [ -z "$(git -C "${git_dir}" diff)" ]; then
exit
fi
-find_vcs \
+find_vcfs \
| while read -r file; do
if [ ! -f "${file}" ]; then
>&2 printf 'File "%s" is in git, but not in the worktree.\n' "${file##*/}"
@@ -61,7 +61,7 @@ git -C "${git_dir}" diff -U0 -- addressbook \
'@@ '*)
for last_uid in "${last_uids[@]}"; do
sed -i '/^'"${last_uid}"'\s/d' "${git_dir}/uids"
- rm "${git_dir}/${last_uid}.vcs"
+ rm "${git_dir}/${last_uid}.vcf"
done
last_uids=()
removals=false
@@ -87,7 +87,7 @@ git -C "${git_dir}" diff -U0 -- addressbook \
newUID=$(uuidgen)
printf '%s\t%s\n' "${newUID}" "${line#+}" \
>> "${git_dir}/uids"
- print_cnt 'new' > "${git_dir}/${newUID}.vcs"
+ print_cnt 'new' > "${git_dir}/${newUID}.vcf"
else
read_line 'old' < <(
sed '
@@ -106,10 +106,10 @@ git -C "${git_dir}" diff -U0 -- addressbook \
if eval '[ "${old'"${key}"'}" != "${new'"${key}"'}" ]'; then
for insert in "${key}:" 'VERSION:' 'BEGIN:VCARD$' ''; do
if [ -z "${insert}" ]; then
- >&2 printf 'Cannot find any place to insert into "%s".\n' "${uid}.vcs"
+ >&2 printf 'Cannot find any place to insert into "%s".\n' "${uid}.vcf"
exit 1
fi
- if ! grep -q '^'"${insert}" "${git_dir}/${uid}.vcs"; then
+ if ! grep -q '^'"${insert}" "${git_dir}/${uid}.vcf"; then
continue
fi
if [ "${insert}" = "${key}:" ]; then
@@ -128,7 +128,7 @@ git -C "${git_dir}" diff -U0 -- addressbook \
'"${insert_command}"'
'"${delete_command}"'
}
- ' "${git_dir}/${uid}.vcs"
+ ' "${git_dir}/${uid}.vcf"
break
done
fi