diff options
author | Alexander Hayden <alexhayden25@gmail.com> | 2020-01-06 13:21:31 -0500 |
---|---|---|
committer | Alexander Hayden <alexhayden25@gmail.com> | 2020-01-06 13:21:31 -0500 |
commit | d376ec8c88be4bb6a8eefae0ff01664f26f9bb30 (patch) | |
tree | 02f8bb673e1e455a75985465e2651ce87f7cdfad | |
parent | 5ebf02fd1b0086da813e9705cda70c58c42da02d (diff) | |
download | modpackman-d376ec8c88be4bb6a8eefae0ff01664f26f9bb30.tar.gz modpackman-d376ec8c88be4bb6a8eefae0ff01664f26f9bb30.zip |
update update.py from master
-rwxr-xr-x | update.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -64,17 +64,20 @@ def install(args): # whitelist client mods (e.g. optifine) names += [line[0] for line in read_file(args.whitelist_file)] + i = 0 for mod in mods: mod_path = os.path.join(args.pack_location, mod[0]) + i += 1 if os.path.exists(mod_path) and os.path.isfile(mod_path) and \ hashlib.sha1(open(mod_path, 'rb').read()).hexdigest() == mod[1]: print("Skipping {mod[0]}, already up to date".format(mod=mod)) else: print('Installing {mod[0]} from {mod[2]}...'.format(mod=mod)) + print(' ({i} of {x})'.format(i=i,x=len(mods)), end='\r') download_obj = requests.get(mod[2], stream=True) with open(mod_path, "wb") as write_file: shutil.copyfileobj(download_obj.raw, write_file) - print("Done!") + print("Done!" + " " * 8) print() print("Removing old mods...") |