From: martin f. krafft Date: Wed, 24 Apr 2013 14:59:54 +0000 (+0200) Subject: reuse lbdbq's tmpdir for our temporary stuff X-Git-Url: https://git.madduck.net/etc/mutt.git/commitdiff_plain/882d8531457c359c4811a1375a9692975110153c?ds=inline;hp=112c0f88e879d6d3dd90e57bf022eb8d241f8916 reuse lbdbq's tmpdir for our temporary stuff --- diff --git a/.lbdbrc b/.lbdbrc index f169a48..99a6b5b 100644 --- a/.lbdbrc +++ b/.lbdbrc @@ -5,13 +5,9 @@ CONTACTS_DIR=$HOME/contacts 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; } - + VCF_TEMP="$tmpdir/contacts.vcf" for i in $CONTACTS_DIR/*; do case "${i##*/}" in ICE*) continue;; esac; cat "$i"; echo ; done >| "$VCF_TEMP" if ! cmp --quiet "$VCF_FILES" "$VCF_TEMP"; then mv "$VCF_TEMP" "$VCF_FILES" fi - cleanup fi