From: martin f. krafft Date: Wed, 24 Apr 2013 14:29:16 +0000 (+0200) Subject: integrate lbdb rc file X-Git-Url: https://git.madduck.net/etc/mutt.git/commitdiff_plain/2cba9ba6247bf11aef1c9b9d9e8133e2ee9524bb?ds=sidebyside;hp=50d679406fc28762932d5b48287e1933215de6fb integrate lbdb rc file --- diff --git a/.lbdbrc b/.lbdbrc new file mode 100644 index 0000000..a66f67c --- /dev/null +++ b/.lbdbrc @@ -0,0 +1,17 @@ +CONTACTS_DIR=$HOME/contacts + +: ${TMPDIR:=/tmp} + +if [ -d $CONTACTS_DIR ]; then + METHODS="$METHODS m_vcf" + VCF_FILES="$TMPDIR/lbdbq.vcf" + + VCF_TEMP="$(tempfile -d $TMPDIR -p lbdbq -s .vcf)" + cleanup() { rm -f $VCF_TEMP; trap - EXIT; } + + for i in $CONTACTS_DIR/*; do case "${i##*/}" in ICE*) continue;; esac; cat "$i"; echo ; done >| "$VCF_TEMP" + if ! cmp "$VCF_FILES" "$VCF_TEMP"; then + mv "$VCF_TEMP" "$VCF_FILES" + fi + cleanup +fi