summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-11-12 00:55:20 +0100
committerErich Eckner <git@eckner.net>2021-11-12 00:55:20 +0100
commit1f629475ec584371d573c7f13b5533de17da23bf (patch)
tree0a984ec4be4a9c227364a5b9460a6e464b3c4019
parentc277109cfa15f4fb65636d883c0a06792b5f5da0 (diff)
downloadcarddav-alpine-converter-1f629475ec584371d573c7f13b5533de17da23bf.tar.xz
whatever
-rwxr-xr-xcarddav-to-alpine15
-rw-r--r--common10
2 files changed, 12 insertions, 13 deletions
diff --git a/carddav-to-alpine b/carddav-to-alpine
index 1f852b9..db8db31 100755
--- a/carddav-to-alpine
+++ b/carddav-to-alpine
@@ -4,16 +4,6 @@
error=0
-keys=(
- 'UID'
- 'EMAIL'
- 'FN'
- 'NICKNAME'
- 'FCC'
- 'COMMENT'
- 'REV'
-)
-
touch "${git_dir}"'/uids'
find "${git_dir}" \
@@ -64,13 +54,12 @@ find "${git_dir}" \
"${_FCC}" \
"${_COMMENT}" \
| sed '
- s@\t@ @
- s@\t$@\n@
+ s@\t\+$@\n@
' >>"${git_dir}"'/uids'
done
sed '
- s@^\S\+ @@
+ s@^\S\+\s@@
' "${git_dir}"'/uids' \
>"${git_dir}"'/addressbook'
diff --git a/common b/common
index 3204673..93eba55 100644
--- a/common
+++ b/common
@@ -1,5 +1,15 @@
#!/hint/bash
+keys=(
+ 'UID'
+ 'EMAIL'
+ 'FN'
+ 'NICKNAME'
+ 'FCC'
+ 'COMMENT'
+ 'REV'
+)
+
gen_rev() {
printf 'REV:%s\n' "$(
date -u -Iseconds \