-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
42 lines (29 loc) · 1.32 KB
/
setup.py
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
import os
import subprocess
import time
os.system('clear')
zsh = open(f"{os.environ['HOME']}/.zshrc", 'a+')
bashrc = open(f"{os.environ['HOME']}/.bashrc", 'a+')
bashrc1 = open(f"{os.environ['HOME']}/.bashrc", 'r')
print('Starting... Do not interrupt process')
value = subprocess.getoutput("""pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
pip install datefinder
cp -r WTC-GROUP-PROJECT ~/Music
rm -rf ~/.WTC-GROUP-PROJECT
mkdir ~/.WTC-GROUP-PROJECT
git clone https://github.com/Waxes27/WTC-GROUP-PROJECT.git ~/.WTC-GROUP-PROJECT""")
if 'not found' in value:
subprocess.getoutput("""pip3 install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
pip3 install datefinder
cp -r WTC-GROUP-PROJECT ~/Music
rm -rf ~/.WTC-GROUP-PROJECT
mkdir ~/.WTC-GROUP-PROJECT
git clone https://github.com/Waxes27/WTC-GROUP-PROJECT.git ~/.WTC-GROUP-PROJECT""")
if "alias clinic" not in bashrc1.read():
bashrc.write("\nalias clinic='python3 ~/.WTC-GROUP-PROJECT/main/main.py'\n")
zsh.write("\nalias clinic='python3 ~/.WTC-GROUP-PROJECT/main/main.py'\n")
os.system("""mkdir ~/.config/.clinic
cp ~/.WTC-GROUP-PROJECT/main/code/codebase/credentials.json ~/.config/.clinic
cp -r ~/.WTC-GROUP-PROJECT/main/.tokens/ ~/.config/.clinic""")
# os.system("clear")
print('SETUP COMPLETE')