summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2025-12-12 15:39:20 -0500
committerAndrew Opalach <andrew@akon.city> 2025-12-12 15:39:20 -0500
commite7747d48a2b9d5f172be9e7102c3ac5e9d22f9dd (patch)
treee4d31670b001d34ac60b9946b7294344dbc92537 /scripts
parent4479a8801e3c2aa901cd1499f459272805472222 (diff)
downloadmodpacks-master.tar.gz
modpacks-master.tar.bz2
modpacks-master.zip
PROJECT 04HEADmaster
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check-tree.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/check-tree.py b/scripts/check-tree.py
index e37110a..8a4b010 100755
--- a/scripts/check-tree.py
+++ b/scripts/check-tree.py
@@ -60,8 +60,8 @@ with open(sys.argv[2], 'r', encoding='utf-8') as f:
continue
if listed_disabled and side not in ('r', 'd'):
filename += '.disabled'
- all_files.append(filename)
target = f'{tree}/{mod_paths[side]}/{filename}'
+ all_files.append(target)
if not os.path.isfile(target):
print(f'err: Mod not found in the specified directory.\n\t{target}')
any_error = True
@@ -87,18 +87,19 @@ with open(sys.argv[3], 'r', encoding='utf-8') as f:
side, path = parse_line(line, config_paths)
if not side:
continue
- all_files.append(path.split('/')[-1])
target = f'{tree}/{config_paths[side]}/{path}'
+ all_files.append(target)
if not os.path.isfile(target):
print(f'err: Config file not found in specified directory.\n\t{target}')
any_error = True
for subdir, dirs, files in os.walk(tree):
for file in files:
- if not (subdir.endswith('mods') or subdir.endswith('resourcepacks') or subdir.endswith('datapacks')):
+ path = os.path.join(subdir, file)
+ if path == 'tree/modrinth.index.json':
continue
- if file not in all_files:
- print(f'err: Erroneous file in tree.\n\t{os.path.join(subdir, file)}')
+ if path not in all_files:
+ print(f'err: Erroneous file in tree.\n\t{path}')
any_error = True
if not any_error: