diff options
-rwxr-xr-x | sfeed_update | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sfeed_update b/sfeed_update index 7578a1d..8ac5b32 100755 --- a/sfeed_update +++ b/sfeed_update @@ -97,30 +97,30 @@ feed() { fi) & } -interrupted() { - isinterrupted="1" -} - cleanup() { # remove temporary files rm -rf "${sfeedtmpdir}" } +interrupted() { + isinterrupted="1" +} + feeds() { echo "Configuration file \"${config}\" is invalid or does not contain a \"feeds\" function." >&2 echo "See sfeedrc.example for an example." >&2 } -# load config file. -loadconfig "$1" -# fetch feeds and store in temporary file. -sfeedtmpdir="$(mktemp -d '/tmp/sfeed_XXXXXX')" # kill whole current process group on ^C (SIGINT). isinterrupted="0" # SIGTERM: signal to terminate parent. trap -- "interrupted" "15" # SIGINT: kill all running childs >:D trap -- "kill -TERM -$$" "2" +# load config file. +loadconfig "$1" +# 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. |