From 2cba9ba6247bf11aef1c9b9d9e8133e2ee9524bb Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 24 Apr 2013 16:29:16 +0200 Subject: [PATCH] integrate lbdb rc file --- .lbdbrc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .lbdbrc 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 -- 2.39.5