summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2020-10-18 16:22:57 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2020-10-18 16:22:57 +0200
commit3d4ab8553f7f2867b1ee5526a6785a2877ec5648 (patch)
tree5056ae71e149e608099b46eeb54c1f2d10b61c67 /README
parent27a14a3d46603ab452dba10796a24591db096d76 (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!
Diffstat (limited to 'README')
-rw-r--r--README2
1 files changed, 1 insertions, 1 deletions
diff --git a/README b/README
index 3cc7ca2..fa8e740 100644
--- 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"
}