-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Meow.py
58 lines (53 loc) · 1.52 KB
/
.Meow.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
54
55
56
57
58
#!/usr/bin/python3
# Tool: MyCat
# Version: 1.0.0.
import sys, os
from time import sleep
from base.system import *
class inst:
def chk_sys(self):
if "linux" in sys.platform or "linux2" in sys.platform:
self.chk_inst()
elif "darwin" in sys.platform:
print("Meoww, MyCat is not available for mac rusers !!")
sys.exit()
elif "win" in sys.platform:
print("Meoww, MyCat is not available for windows users !!")
sys.exit()
else:
print("MyCat is not available for \'%s\' right now !!!" %sys.platform)
sys.exit()
def chk_inst(self):
if os.path.exists(bpath+"meow") and os.path.exists(spath+"MyCat"):
pass
else:
self.inst()
def inst(self):
if system=="ubuntu":
noti()
opt=raw_input("\033[01;33m Do you want to install MyCat? [\033[01;32mY/n\033[01;33m] >> \033[00m")
if opt=="Y" or opt=="y":
os.system("sh install")
elif opt=="N" or opt=="n":
sys.exit()
else:
print("\n \033[01;31m\007Command not found :\033[01;32m \'"+opt+"\'")
sleep(1)
self.inst()
else:
noti()
opt=raw_input("\033[01;33m Do you want to install MyCat [\033[01;32mY/n\033[01;33m] >> \033[00m")
if opt=="Y" or opt=="y":
os.system("sh install")
elif opt=="N" or opt=="n":
sys.exit()
else:
print("\n \033[01;31m\007Command not found :\033[01;32m \'"+opt+"\'")
sleep(1)
self.inst()
def MyCat():
try:
inst().chk_sys()
except KeyboardInterrupt:
exit()
MyCat()