From 404beb96c0984ccf8c568bd93a29212f7a7aaa61 Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Tue, 2 Nov 2021 10:09:02 -0700 Subject: [PATCH] modify setup to locally set $XDG_CONFIG_HOME env var if it is not set --- ani-cli | 127 ++++++++++++++++++++++++++--------------------------- aniwrapper | 7 ++- setup.sh | 15 +++---- 3 files changed, 73 insertions(+), 76 deletions(-) diff --git a/ani-cli b/ani-cli index d691817..d1c7563 100755 --- a/ani-cli +++ b/ani-cli @@ -9,11 +9,10 @@ logfile="${XDG_CACHE_HOME:-$HOME/.cache}/ani-hsts" # Set config directory if [[ -z "$XDG_CONFIG_HOME" ]]; then - config_dir="$HOME/.config/ani-cli" -else - config_dir="$XDG_CONFIG_HOME/ani-cli" + XDG_CONFIG_HOME="$HOME/.config" fi +config_dir="$XDG_CONFIG_HOME/ani-cli" history_db="$XDG_CONFIG_HOME/ani-cli/history.sqlite3" # sql=$(sqlite3 -noheader "$history_db") @@ -386,17 +385,17 @@ open_episode() { video_url=$(get_links "$dpage_url") case $video_url in - *streamtape*) - # If direct download not available then scrape streamtape.com - BROWSER=${BROWSER:-firefox} - printf "scraping streamtape.com\n" - video_url=$(curl -s "$video_url" | sed -n -E ' + *streamtape*) + # If direct download not available then scrape streamtape.com + BROWSER=${BROWSER:-firefox} + printf "scraping streamtape.com\n" + video_url=$(curl -s "$video_url" | sed -n -E ' /^