clemmy/creds.sh

20 lines
377 B
Bash
Raw Normal View History

2023-01-17 01:07:40 +11:00
if [ ! -f ~/.config/clemmy/accounts.csv ]; then
touch ~/.config/clemmy/accounts.csv
echo "Do you already have an account? y/n"
read choice
if [ $choice == n ]; then
register
else
login
fi
exit
fi
accs=$(cat ~/.config/clemmy/accounts.csv)
i=0
for line in ${accs[*]}; do
IFS=, read insts[$i] tokes[$i] <<< $line
i=$((i+1))
done
INSTANCE=${insts[0]}
TOKE=${tokes[0]}