summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2022-03-21 23:03:47 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2022-03-21 23:03:47 +0100
commita9445184bb7b4975bc27e7b41e7bfd9f31f1c0ac (patch)
tree86681dc2d3c20db94bc9c89aad6ade3319f5b464
parentdd91c54d0e2ffe2e68ca719098d7d5507dbc62ea (diff)
README: update sfeed_update_xargs example
Set exit status non-zero if any of the feeds failed similar to what sfeed_update also does now.
-rw-r--r--README6
1 files changed, 6 insertions, 0 deletions
diff --git a/README b/README
index 95f4e9a..648e63e 100644
--- a/README
+++ b/README
@@ -742,12 +742,18 @@ sfeed_update_xargs shellscript:
# fetch feeds and store in temporary directory.
sfeedtmpdir="$(mktemp -d '/tmp/sfeed_XXXXXX')"
+ mkdir -p "${sfeedtmpdir}/feeds"
+ touch "${sfeedtmpdir}/ok"
# make sure path exists.
mkdir -p "${sfeedpath}"
# print feeds for parallel processing with xargs.
feeds | SFEED_UPDATE_CHILD="1" xargs -r -0 -P "${maxjobs}" -L 6 "$(readlink -f "$0")"
+ status=$?
+ # check error exit status indicator for parallel jobs.
+ test -f "${sfeedtmpdir}/ok" || status=1
# cleanup temporary files etc.
cleanup
+ exit ${status}
- - -