move lua scripts into a separate directory

This commit is contained in:
Sarah Hoffmann
2024-12-05 15:19:36 +01:00
parent 639630d5fe
commit 4760e8341b
17 changed files with 14 additions and 9 deletions

View File

@@ -75,6 +75,7 @@ class Configuration:
class _LibDirs:
osm2pgsql: Path
sql = paths.SQLLIB_DIR
lua = paths.LUALIB_DIR
data = paths.DATA_DIR
self.lib_dir = _LibDirs()
@@ -207,7 +208,7 @@ class Configuration:
style = getattr(self, 'IMPORT_STYLE')
if style in ('admin', 'street', 'address', 'full', 'extratags'):
return self.config_dir / f'import-{style}.lua'
return self.lib_dir.lua / f'import-{style}.lua'
return self.find_config_file('', 'IMPORT_STYLE')