Added option to save password

This commit is contained in:
Shihaam Abdul Rahman 2021-04-25 22:08:09 +05:00
parent 65c8a7e4ff
commit 41cbc6a9f7
2 changed files with 11 additions and 1 deletions

11
bml.sh
View File

@ -9,11 +9,20 @@ source .env 2> /dev/null
if [ "$BML_USERNAME" = "" ] if [ "$BML_USERNAME" = "" ]
then then
echo "${red}Credentials not found in .env file${reset}" echo ${red}Credentials not found in .env file${reset}
echo "" echo ""
read -p 'Username: ' BML_USERNAME read -p 'Username: ' BML_USERNAME
read -s -p 'Password: ' BML_PASSWORD read -s -p 'Password: ' BML_PASSWORD
echo "" echo ""
read -p 'Do you want to save login? [Y/N] ' SAVE_LOGIN
if [ "$SAVE_LOGIN" = "Y" ]
then
echo BML_USERNAME=$BML_USERNAME > .env
echo BML_PASSWORD=$BML_PASSWORD >> .env
else
:
fi
echo "" echo ""
else else
: :

1
test Normal file
View File

@ -0,0 +1 @@
adas=bruh