summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
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: