first working (on linux) draft of installer.py
This commit is contained in:
parent
45cadfa956
commit
22db0ee622
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
*.log
|
*.log
|
||||||
*.env
|
*.env
|
||||||
test.py
|
test.py
|
||||||
|
checklist.md
|
10
installer.py
10
installer.py
@ -27,8 +27,7 @@ elif platform.system() == "Darwin":
|
|||||||
os.chdir(homedir + '/.minecraft')
|
os.chdir(homedir + '/.minecraft')
|
||||||
mcfolder = Path.cwd()
|
mcfolder = Path.cwd()
|
||||||
|
|
||||||
os.chdir(homedir + '/.minecraft/mods')
|
modfolder = homedir + '/.minecraft/mods'
|
||||||
modfolder = Path.cwd()
|
|
||||||
|
|
||||||
os.chdir(mcfolder)
|
os.chdir(mcfolder)
|
||||||
|
|
||||||
@ -38,9 +37,10 @@ time.sleep(2)
|
|||||||
|
|
||||||
|
|
||||||
#begin mod backup and deletion
|
#begin mod backup and deletion
|
||||||
#DOESN'T CURRENTLY BACK UP EXISTING MODS.
|
#THIS DOESN'T CURRENTLY BACK UP EXISTING MODS.
|
||||||
try:
|
try:
|
||||||
shutil.rmtree(modfolder)
|
shutil.rmtree(modfolder)
|
||||||
|
print("Cleared previous mods.")
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
print("Error: %s - %s." % (e.filename, e.strerror))
|
print("Error: %s - %s." % (e.filename, e.strerror))
|
||||||
|
|
||||||
@ -67,4 +67,6 @@ tar_file_path = 'mods.tar.gz'
|
|||||||
extract_to = 'mods'
|
extract_to = 'mods'
|
||||||
extract_tar_archive(tar_file_path, extract_to)
|
extract_tar_archive(tar_file_path, extract_to)
|
||||||
|
|
||||||
print("")
|
print("All Done!")
|
||||||
|
print("This script will exit and close in ten seconds. :)")
|
||||||
|
time.sleep(10)
|
Reference in New Issue
Block a user