Initial install method implementation

This commit is contained in:
Евгений Титаренко 2022-10-01 18:49:58 +03:00
parent c339f1ea08
commit 2ebc84ca2c
3 changed files with 47 additions and 9 deletions

View file

@ -1,5 +1,6 @@
import os
from sys import platform
import shutil
def __get_mc_dir():
directory = ""
@ -35,5 +36,9 @@ def is_path_exist(path:str):
def is_standart_dir_structure():
return not os.path.exists(os.path.join(directory, "home"))
def install(filename):
shutil.copy2(os.path.join(cache_dir,filename),\
os.path.join(mc_dir,"mods",filename))
mc_dir = __get_mc_dir()
cache_dir = __get_cache_dir()