correct extract_tar_archive
to extract_tar
This commit is contained in:
parent
e332bc8c58
commit
f7c4f52eb3
19
installer.py
19
installer.py
@ -130,30 +130,31 @@ global modfolder
|
||||
|
||||
if platform.system() == "Linux":
|
||||
print("Operating system detected: Linux")
|
||||
|
||||
os.chdir(".minecraft")
|
||||
mcfolder = str(Path.cwd())
|
||||
modfolder = mcfolder + '/mods'
|
||||
print("Changed current working directory to '" + str(mcfolder) + "'")
|
||||
|
||||
print("Backing up mod folder...")
|
||||
print("Backing up minecraft install...")
|
||||
print()
|
||||
print("Don't close the window! This'll take a moment...")
|
||||
compress_tar(modfolder, "mod-backup.tar.gz")
|
||||
|
||||
compress_tar(mcfolder, "mod-backup.tar.gz")
|
||||
|
||||
elif platform.system() == "Windows":
|
||||
print("Operating system detected: Windows")
|
||||
|
||||
os.chdir("AppData/Roaming/.minecraft")
|
||||
mcfolder = str(Path.cwd())
|
||||
print("Changed current working directory to '" + str(mcfolder) + "'")
|
||||
|
||||
win_check_folder_exists("mods")
|
||||
|
||||
modfolder = str(mcfolder) + '/mods'
|
||||
|
||||
print("Backing up mod folder...")
|
||||
print("Backing up minecraft install...")
|
||||
print()
|
||||
print("Don't close the window! This'll take a moment...")
|
||||
compress_tar(modfolder, "mod-backup.tar.gz")
|
||||
|
||||
modfolder = str(mcfolder) + '/mods'
|
||||
compress_tar(mcfolder, "mod-backup.tar.gz")
|
||||
|
||||
os.chdir(mcfolder)
|
||||
time.sleep(2)
|
||||
@ -171,7 +172,7 @@ print("Fetching mods...")
|
||||
wget.download('https://git.sarushinobie.dev/saru/family-minecraft-modpack/releases/download/0.0.1/mods.tar.gz')
|
||||
# this is insane. `wget` the fucking goat. who knew windows package manager was so cool?
|
||||
|
||||
extract_tar_archive('mods.tar.gz', 'mods')
|
||||
extract_tar('mods.tar.gz', 'mods')
|
||||
# ('tarfile', 'directory to extract to')
|
||||
|
||||
ascii_art()
|
||||
|
Loading…
x
Reference in New Issue
Block a user