trim redundant code under os specific operations
This commit is contained in:
parent
dac69d1ea5
commit
944c9e8b0c
16
installer.py
16
installer.py
@ -18,22 +18,18 @@ if platform.system() == "Linux":
|
||||
print("Operating system detected: Linux")
|
||||
os.chdir(homedir + '/.minecraft')
|
||||
mcfolder = Path.cwd()
|
||||
modfolder = homedir + '/.minecraft/mods'
|
||||
os.chdir(mcfolder)
|
||||
print("Changed current working directory to '" + str(mcfolder) + "'")
|
||||
time.sleep(2)
|
||||
modfolder = mcfolder + '/mods'
|
||||
|
||||
elif platform.system() == "Windows":
|
||||
print("Operating system detected: Windows")
|
||||
os.chdir("AppData/Roaming/.minecraft/mods")
|
||||
mcfolder = Path.cwd()
|
||||
os.chdir("mods")
|
||||
modfolder = Path.cwd
|
||||
os.chdir(mcfolder)
|
||||
print("Changed current working directory to '" + str(mcfolder) + "'")
|
||||
time.sleep(2)
|
||||
modfolder = mcfolder + '/mods'
|
||||
|
||||
os.chdir(mcfolder)
|
||||
|
||||
os.chdir(mcfolder)
|
||||
print("Changed current working directory to '" + str(mcfolder) + "'")
|
||||
time.sleep(2)
|
||||
|
||||
# delete previous mods
|
||||
# WARN: THIS DOESN'T CURRENTLY BACK UP EXISTING MODS.
|
||||
|
Reference in New Issue
Block a user