-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvidzyinstaller.py
53 lines (38 loc) · 1.4 KB
/
vidzyinstaller.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
41
42
43
44
45
46
47
48
49
50
51
52
53
import os
import sys
os.system("clear")
print(r" _ _ _ _ ")
print(r"| | | (_) | | ")
print(r"| | | |_ __| |_____ _ ")
print(r"| | | | |/ _` |_ / | | |")
print(r"\ \_/ / | (_| |/ /| |_| |")
print(r" \___/|_|\__,_/___|\__, |")
print(r" __/ |")
print(r" |___/ ")
print(r" Installer ")
print("\n")
i = input(
"Vidzy installer will guide you through the installation of Vidzy on your server. Note: Vidzy installer is in alpha and may not work properly. Press enter to continue"
)
os.system("clear")
print("Please confirm that you have the following packages installed:\nPython3\nPip (python package manager)\n\n")
i = input("(Y/n) ")
if i.lower() == "n":
sys.exit()
os.system("clear")
os.system("pip install -r requirements.txt")
os.system("clear")
os.system("cp .env.sample .env")
i = input("What editor would you like to use to configure .env? (nano/vi/custom) ")
if i == "nano":
os.system("nano .env")
elif i == "vi":
os.system("vi .env")
elif i == "custom":
j = input("What editor would you like to use to configure .env? ")
os.system(j + " .env")
os.system("clear")
i = input("What mysql database should Vidzy use?")
os.system("mysql " + i + " < mysql-dump/MYSQL_DATABASE.sql")
print("If above command fails, than just source VIDZY_DIR/mysql-dump/MYSQL_DATABASE.sql")
print("\n\n\nVidzy Installation Completed!")