aboutsummaryrefslogtreecommitdiff
path: root/modpackman.py
diff options
context:
space:
mode:
Diffstat (limited to 'modpackman.py')
-rwxr-xr-xmodpackman.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/modpackman.py b/modpackman.py
index 18cdecc..69ebe41 100755
--- a/modpackman.py
+++ b/modpackman.py
@@ -19,6 +19,7 @@ from util import config
def install():
mods_location = os.path.join(config["pack"]["location"], "mods")
whitelist = config["pack"]["whitelist"]
+ blacklist = config["pack"]["blacklist"]
# Actual download links are stored in pack-lock.ini, so we need to read it in here
pack_lock = RawConfigParser()
@@ -39,8 +40,9 @@ def install():
checksum, url = entry[1].split(',')
mod_path = os.path.join(mods_location, name)
i += 1
- if os.path.exists(mod_path) and os.path.isfile(mod_path) and \
- hashlib.sha1(open(mod_path, 'rb').read()).hexdigest() == checksum:
+ if (os.path.exists(mod_path) and os.path.isfile(mod_path) and \
+ hashlib.sha1(open(mod_path, 'rb').read()).hexdigest() == checksum) or \
+ name in blacklist:
print(f"Skipping {name}, already up to date")
else:
print(f'Installing {name} from {url}...')