diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2020-10-18 16:22:57 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2020-10-18 16:22:57 +0200 |
commit | 3d4ab8553f7f2867b1ee5526a6785a2877ec5648 (patch) | |
tree | 5056ae71e149e608099b46eeb54c1f2d10b61c67 | |
parent | 27a14a3d46603ab452dba10796a24591db096d76 (diff) |
README: improve etag example with escaping of the filename
Use the same base filename as the feed file, because sfeed_update replaces '/'
in names with '_':
filename="$(printf '%s' "$1" | tr '/' '_')"
This fixes the example for fetching feeds with names containing '/'.
Reported by __20h__, thanks!
-rw-r--r-- | README | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -588,7 +588,7 @@ the --etag-save and --etag-compare options: # fetch(name, url, feedfile) fetch() { - etag="$HOME/.sfeed/etags/$1" + etag="$HOME/.sfeed/etags/$(basename "$3")" curl --etag-save "${etag}" --etag-compare "${etag}" "$2" } |