-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathuninstall.py
executable file
·38 lines (35 loc) · 1.21 KB
/
uninstall.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
import os
import sys
import platform
def uninstall_plantFEM():
print("Detecting OS type...")
pf=platform.system()
if pf == 'Windows':
print("OS : Windows")
print("Now installing...")
os.system("install.bat")
print("Please use Windows Subsystem Linux(WSL) ")
print("Successfully unInstalled!!")
elif pf == "Darwin":
print("OS : macOS")
print("Now installing...")
#os.system("sh ./setup/setup_macOS")
os.system("sudo /opt/plantfem/bin/compress")
os.system("sudo unlink /usr/local/bin/plantfem")
os.system("sudo unlink /usr/local/bin/soja")
os.system("sudo unlink /opt/plantfem")
os.system("*.so")
print("Successfully Uninstalled!!")
elif pf == "Linux":
print("OS : Linux")
print("Now installing...")
#os.system("sh ./setup/setup")
os.system("sh /opt/plantfem/bin/compress")
os.system("sudo unlink /usr/local/bin/plantfem")
os.system("sudo unlink /usr/local/bin/soja")
os.system("sudo unlink /opt/plantfem")
print("Successfully Uninstalled!!")
else:
print("OS : Unknown ")
if __name__ == "__main__":
uninstall_plantFEM()