diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2018-10-24 18:39:18 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2018-10-24 18:39:18 +0200 |
commit | 9eafdfc22a0338b5171d24ce39e6f723b0212055 (patch) | |
tree | bd9369e129ee71ef138501b5d74ca0bf1d3d92d8 | |
parent | 8699fa2bb4c75670952fee503a58ca4a652627eb (diff) |
Revert "sfeed_update: replace non-POSIX mktemp with $$"
This reverts commit 8699fa2bb4c75670952fee503a58ca4a652627eb.
There is a regression in directory permissions among other things.
-rwxr-xr-x | sfeed_update | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sfeed_update b/sfeed_update index 374ad5c..5ee99ee 100755 --- a/sfeed_update +++ b/sfeed_update @@ -5,9 +5,6 @@ # defaults sfeedpath="$HOME/.sfeed/feeds" -# temporary directory. -sfeedtmpdir="/tmp/sfeed_$$" - # used for processing feeds concurrently: wait until ${maxjobs} amount of # feeds are finished at a time. maxjobs=8 @@ -150,8 +147,9 @@ trap -- "sighandler 2" "INT" trap -- "sighandler 15" "TERM" # load config file. loadconfig "$1" -# make sure sfeed path and temporary directory exist. -mkdir -m 700 -p "${sfeedtmpdir}" +# fetch feeds and store in temporary file. +sfeedtmpdir="$(mktemp -d '/tmp/sfeed_XXXXXX')" +# make sure path exists. mkdir -p "${sfeedpath}" # fetch feeds specified in config file. feeds |