commit 3d4ab8553f7f2867b1ee5526a6785a2877ec5648
parent 27a14a3d46603ab452dba10796a24591db096d76
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 18 Oct 2020 16:22:57 +0200
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!
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README b/README
@@ -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"
}