diff options
author | Erich Eckner <git@eckner.net> | 2021-11-13 23:05:31 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-11-13 23:05:31 +0100 |
commit | 9ac05a65b68cf60a3ccd15b4e869ae440ce66010 (patch) | |
tree | a2b0842813ca1931002a942efd5c371e76b4482b /common | |
parent | 752fb28b19c4c54d3f2bffd415b197a1fc087672 (diff) | |
download | carddav-alpine-converter-master.tar.xz |
Diffstat (limited to 'common')
-rw-r--r-- | common | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -30,7 +30,19 @@ find_vcfs() { s@^@'"${git_dir%/}"'/@ ' } \ - | sort -u + | sort -u \ + | if [ -n "${old_uids}" ]; then + join -1 1 -2 3 -o 2.1,2.2,2.3 -a 1 -e 1 -t ' ' - <( + printf "${git_dir}"'/%s.vcf\n' ${old_uids} \ + | cat -n \ + | awk '{print "0 " $1 " " $2}' \ + | sort -k3,3 + ) \ + | sort -k1n,1 -k2n,2 \ + | awk '{print $3}' + else + cat + fi } git_dir="$1" |