diff options
author | Case Duckworth | 2022-07-23 22:50:58 -0500 |
---|---|---|
committer | Case Duckworth | 2022-07-23 22:50:58 -0500 |
commit | bd6a5765803206ac3b1840cfdff8fa4c0cd222ae (patch) | |
tree | b58c6c10011377ea5fcfe0836af6f26b9afcd5b2 | |
parent | oops (diff) | |
download | sfeed-bd6a5765803206ac3b1840cfdff8fa4c0cd222ae.tar.gz sfeed-bd6a5765803206ac3b1840cfdff8fa4c0cd222ae.zip |
Refactor
-rwxr-xr-x | sfeed_update_urls.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sfeed_update_urls.sh b/sfeed_update_urls.sh index 79a7876..d4eaebf 100755 --- a/sfeed_update_urls.sh +++ b/sfeed_update_urls.sh | |||
@@ -6,9 +6,10 @@ feed() { # feed NAME URL BASE_URL ENCODING | |||
6 | printf '%s\t%s\t%s\n' "$1" "$2" "${3:-}" | 6 | printf '%s\t%s\t%s\n' "$1" "$2" "${3:-}" |
7 | } | 7 | } |
8 | 8 | ||
9 | mkdir -p "$SFEED_DATA/urls" | 9 | DIR="${SFEED_DATA:-$HOME/.sfeed}/urls" |
10 | mkdir -p "$DIR" | ||
10 | 11 | ||
11 | feeds | awk -v dir="$SFEED_DATA/urls" ' | 12 | feeds | awk -v dir="$DIR" ' |
12 | BEGIN{FS="\t";} | 13 | BEGIN{FS="\t";} |
13 | { | 14 | { |
14 | gsub(/\//, "_", $1); | 15 | gsub(/\//, "_", $1); |