about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-07-23 22:50:58 -0500
committerCase Duckworth2022-07-23 22:50:58 -0500
commitbd6a5765803206ac3b1840cfdff8fa4c0cd222ae (patch)
treeb58c6c10011377ea5fcfe0836af6f26b9afcd5b2
parentoops (diff)
downloadsfeed-bd6a5765803206ac3b1840cfdff8fa4c0cd222ae.tar.gz
sfeed-bd6a5765803206ac3b1840cfdff8fa4c0cd222ae.zip
Refactor
-rwxr-xr-xsfeed_update_urls.sh5
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
9mkdir -p "$SFEED_DATA/urls" 9DIR="${SFEED_DATA:-$HOME/.sfeed}/urls"
10mkdir -p "$DIR"
10 11
11feeds | awk -v dir="$SFEED_DATA/urls" ' 12feeds | awk -v dir="$DIR" '
12BEGIN{FS="\t";} 13BEGIN{FS="\t";}
13{ 14{
14 gsub(/\//, "_", $1); 15 gsub(/\//, "_", $1);