-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·30 lines (23 loc) · 767 Bytes
/
run.sh
File metadata and controls
executable file
·30 lines (23 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'
file='.auth.json'
if [ -r $file ]
then
printf "\n${GREEN}AUTHENTICATION FILE EXISTS${NC}\n\n\n\n"
email=`jq '.mail' .auth.json`
password=`jq '.password' .auth.json`
else
printf "\n${RED}AUTHENTICATION FILE DOES NOT EXIST${NC}\n${GREEN}Creating AUTH file${NC}\n\n"
read -p "Enter EMAIL: " email
read -p "Enter PASSWORD: " password
read -p "Confirm EMAIL or PASSWORD? (Y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1
printf '{\n\t"mail":"%s",\n\t"password":"%s"\n}' $email $password >> .auth.json
fi
gmail='**'$email'**'
gmail_password='**'$password'**'
export mail=gmail
export password=gmail_password
export FLASK_APP=run.py
flask run