From bd6a5765803206ac3b1840cfdff8fa4c0cd222ae Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 23 Jul 2022 22:50:58 -0500 Subject: Refactor --- sfeed_update_urls.sh | 5 +++-- 1 file 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 printf '%s\t%s\t%s\n' "$1" "$2" "${3:-}" } -mkdir -p "$SFEED_DATA/urls" +DIR="${SFEED_DATA:-$HOME/.sfeed}/urls" +mkdir -p "$DIR" -feeds | awk -v dir="$SFEED_DATA/urls" ' +feeds | awk -v dir="$DIR" ' BEGIN{FS="\t";} { gsub(/\//, "_", $1); -- cgit 1.4.1-21-gabe81