Optimizing code, add installer
This commit is contained in:
Dima YaFlay
2022-01-03 01:45:03 +03:00
committed by GitHub
parent 7f23d68370
commit 481eb9abfd

View File

@@ -1,13 +1,13 @@
from os import getcwd, system, path from os import getcwd, system, path
import urllib.request as urlreq from urllib.request import urlretrieve
# import modules # import modules
def window_download(): cwd = getcwd()
cwd = getcwd() windows = 'https://raw.githubusercontent.com/YaFlay/Minecraft_server_creating/main/windows.py'
url = 'https://raw.githubusercontent.com/YaFlay/Minecraft_server_creating/main/windows.py' if not path.isfile('/windows.py'): urlretrieve(windows, str(cwd)+'/windows.py')
if not path.isfile('/windows.py'): urlreq.urlretrieve(url, str(cwd)+'/windows.py') commands = 'https://raw.githubusercontent.com/YaFlay/Minecraft_server_creating/main/commands.py'
url2 = 'https://raw.githubusercontent.com/YaFlay/Minecraft_server_creating/main/commands.py' if not path.isfile('/commands.py'): urlretrieve(commands, str(cwd)+'/commands.py')
if not path.isfile('/commands.py'): urlreq.urlretrieve(url2, str(cwd)+'/commands.py') installer = 'https://raw.githubusercontent.com/YaFlay/Minecraft_server_creating-BETA-/main/installer.py'
system('python3 '+ str(cwd)+'/windows.py') if not path.isfile('/installer.py'): urlretrieve(installer, str(cwd)+'/installer.py')
system('python3 '+ str(cwd)+'/windows.py')
window_download()