Compare commits

...

2 Commits

Author SHA1 Message Date
rick 6a251b4555 fixed bug in init 2021-07-04 08:09:01 +05:30
rick ad738a4c61 fixed two bugs 2021-07-04 08:01:07 +05:30
1 changed files with 3 additions and 6 deletions

View File

@ -34,20 +34,17 @@ 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/"}
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