-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinitialize.sh
43 lines (37 loc) · 1.12 KB
/
initialize.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
if [ ! -d "env" ]; then
echo "Creating virtual environment: env"
python3 -m venv env
source env/bin/activate
echo "Upgrading pip..."
python3 -m pip install --upgrade pip
echo "Installing dependencies..."
pip install -r requirements.txt
echo "Installing pre-commit hooks..."
pre-commit install
echo "Done!"
fi
# Coinbase API keys
CB_API_KEY=""
CB_API_SECRET=""
CB_API_PASS=""
# Coinbase Sandbox API keys
CB_API_KEY_TEST=""
CB_API_SECRET_TEST=""
CB_API_PASS_TEST=""
# User's email credentials
EMAIL_ADDRESS=""
EMAIL_PASSWORD=""
if [ ! -f ".env" ]; then
echo "Creating .env file to store environment variables..."
touch .env
echo "CB_API_KEY = \"$CB_API_KEY\"" >> .env
echo "CB_API_SECRET = \"$CB_API_SECRET\"" >> .env
echo "CB_API_PASS = \"$CB_API_PASS\"" >> .env
echo "CB_API_KEY_TEST = \"$CB_API_KEY_TEST\"" >> .env
echo "CB_API_SECRET_TEST = \"$CB_API_SECRET_TEST\"" >> .env
echo "CB_API_PASS_TEST = \"$CB_API_PASS_TEST\"" >> .env
echo "EMAIL_ADDRESS = \"$EMAIL_ADDRESS\"" >> .env
echo "EMAIL_PASSWORD = \"$EMAIL_PASSWORD\"" >> .env
echo "Done!"
fi