From ad738a4c61639beb8be960695bca3eddbbb82015 Mon Sep 17 00:00:00 2001 From: rick <7rick@tuta.io> Date: Sun, 4 Jul 2021 08:01:07 +0530 Subject: [PATCH 1/3] fixed two bugs --- twtxt-c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twtxt-c b/twtxt-c index fb69d7e..34dcde9 100755 --- a/twtxt-c +++ b/twtxt-c @@ -34,10 +34,10 @@ case $1 in -* | --*) usage; error_exit "unknown option $1" ;; init) - read -p "Your desired nickname [$USER]: " nickname + read -p "Your desired nickname [$USER]: " nick nick=${nick:-"$USER"} read -p "Type path to your twtxt [/home/$USER/twtxt.txt]: " path_to_twtxt - twtxt=${path_to_twtxt:-"/home/$USER/twtxt.txt"} + path_to_twtxt=${path_to_twtxt:-"/home/$USER/twtxt.txt"} echo "" >> $path_to_twtxt read -p "Type path to your twtxt config folder [/home/$USER/.config/twtxt-c/]: " config config=${config:-"/home/$USER/.config/twtxt-c/"} -- 2.34.1 From 6a251b45550ed5c73a7db418a34812324fba49e7 Mon Sep 17 00:00:00 2001 From: rick <7rick@tuta.io> Date: Sun, 4 Jul 2021 08:09:01 +0530 Subject: [PATCH 2/3] fixed bug in init --- twtxt-c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/twtxt-c b/twtxt-c index 34dcde9..bfa44f6 100755 --- a/twtxt-c +++ b/twtxt-c @@ -44,10 +44,7 @@ case $1 in mkdir -p $config read -p "URL to twtxt [https://example.com/twtxt.txt]: " url url=${url:-"https://example.com/twtxt.txt"} - printf "[twtxt]\n - nick = %s\n - twtfile = %s\n - url = %s\n" "$nick" "$twtxt" "$url" >> $config + printf "[twtxt]\n nick = %s\n twtfile = %s\n url = %s\n" "$nick" "$path_to_twtxt" "$url" >> $config/config ;; tweet) export config=/home/g1n/.config/twtxt/config -- 2.34.1 From 812aa37604232209d0e2a464371d1915e1e1ee22 Mon Sep 17 00:00:00 2001 From: rick <7rick@tuta.io> Date: Sun, 4 Jul 2021 08:25:16 +0530 Subject: [PATCH 3/3] config file location in tweet --- twtxt-c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twtxt-c b/twtxt-c index bfa44f6..a56f72b 100755 --- a/twtxt-c +++ b/twtxt-c @@ -47,7 +47,7 @@ case $1 in printf "[twtxt]\n nick = %s\n twtfile = %s\n url = %s\n" "$nick" "$path_to_twtxt" "$url" >> $config/config ;; tweet) - export config=/home/g1n/.config/twtxt/config + export config=/home/$USER/.config/twtxt-c/config printf "%s\t%s\n" "$(date +'%FT%T%:z')" "$2" >> $(awk '/twtfile/ {print $3}' $config) ;; *) -- 2.34.1