diff options
author | Erich Eckner <git@eckner.net> | 2021-11-12 00:55:20 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-11-12 00:55:20 +0100 |
commit | 1f629475ec584371d573c7f13b5533de17da23bf (patch) | |
tree | 0a984ec4be4a9c227364a5b9460a6e464b3c4019 | |
parent | c277109cfa15f4fb65636d883c0a06792b5f5da0 (diff) | |
download | carddav-alpine-converter-1f629475ec584371d573c7f13b5533de17da23bf.tar.xz |
whatever
-rwxr-xr-x | carddav-to-alpine | 15 | ||||
-rw-r--r-- | common | 10 |
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' @@ -1,5 +1,15 @@ #!/hint/bash +keys=( + 'UID' + 'EMAIL' + 'FN' + 'NICKNAME' + 'FCC' + 'COMMENT' + 'REV' +) + gen_rev() { printf 'REV:%s\n' "$( date -u -Iseconds \ |