diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-08-07 20:46:42 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-08-07 20:46:42 +0200 |
commit | f23af0821309e86d9d6db59796d245b6986e2cd3 (patch) | |
tree | c7673b5f8d6c6d0b52dc4747808a1c0f871d7f80 /sfeed_update | |
parent | f6ad2583a768bfb1ddbc85a5a74e39d4167240ff (diff) |
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.
Diffstat (limited to 'sfeed_update')
-rwxr-xr-x | sfeed_update | 7 |
1 files changed, 3 insertions, 4 deletions
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. |