diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2021-01-28 17:05:32 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2021-01-28 17:05:32 +0100 |
commit | 76274ca7980b2f71fc07b2dc59123e3f66b8fd9d (patch) | |
tree | 6d12b7bf07670f66c0da6681a1ec968cd4461089 /README | |
parent | 438634fec934102839e05b5c587d7eb3fdf17571 (diff) |
README: fix xargs -P example when there are no feeds
Kindof a non-issue but if theres a sfeedrc with no feeds then xargs will still
be executed and give an error. The xargs -r option (GNU extension) fixes this:
From the OpenBSD xargs(1) man page:
"-r Do not run the command if there are no arguments. Normally the
command is executed at least once even if there are no arguments."
Reproducable with the sfeedrc:
feeds() {
true
}
Diffstat (limited to 'README')
-rw-r--r-- | README | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -663,7 +663,7 @@ sfeed_update_xargs shellscript: # make sure path exists. mkdir -p "${sfeedpath}" # print feeds for parallel processing with xargs. - feeds | SFEED_UPDATE_CHILD="1" xargs -0 -P "${maxjobs}" -L 6 "$(readlink -f "$0")" + feeds | SFEED_UPDATE_CHILD="1" xargs -r -0 -P "${maxjobs}" -L 6 "$(readlink -f "$0")" # cleanup temporary files etc. cleanup |