From f23af0821309e86d9d6db59796d245b6986e2cd3 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Fri, 7 Aug 2015 20:46:42 +0200 Subject: sfeed_update: just use the feed name as the temporary filename the base temporary directory is random. The directory is cleaned afterwards or on SIGTERM etc so remove this unneeded line. --- sfeed_update | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sfeed_update') diff --git a/sfeed_update b/sfeed_update index 58d25fc..56be43a 100755 --- a/sfeed_update +++ b/sfeed_update @@ -63,19 +63,18 @@ convertencoding() { # fetch and parse feed. # feed(name, feedurl, [basesiteurl], [encoding]) feed() { - (tmpfeedfile=$(mktemp -p "${sfeedtmpdir}") - name="$1" + (name="$1" + tmpfeedfile="${sfeedtmpdir}/${name}" tmpencfile="" encoding="$4" sfeedfile="${sfeeddir}/$1" if [ ! "${encoding}" = "" ]; then fetchfeed "$2" "$1" "${sfeedfile}" | convertencoding "${encoding}" "utf-8" else # detect encoding. - tmpencfile=$(mktemp -p "${sfeedtmpdir}") + tmpencfile="${tmpfeedfile}.enc" fetchfeed "$2" "$1" "${sfeedfile}" > "${tmpencfile}" detectenc=$(sfeed_xmlenc < "${tmpencfile}") convertencoding "${detectenc}" "utf-8" < "${tmpencfile}" - rm -f "${tmpencfile}" fi | sfeed "$3" > "${tmpfeedfile}" # get new data and merge with old. -- cgit v1.2.3