Having a scripted build process on Windows 10 (CMD or Powershell, both is possible) I want to build a spatialite database with the ready to use but empty schema created from a couple of sql files.
I already found out, that it is possible to call
spatialite.exe -init <SqlFile>.sql <OutputSpatialiteDatabase>.sqlite
which creates an empty sqlite database with the given name, executes all commands in the sql script on it and then provides the interactive command shell on it (it does NOT exit).
Thats already pretty close to what I want, but I want to execute multiple Sql Files as these represent multiple (optional) parts of the schema that I want to create just on purpose (like use case specific modules).
Also the script should exit correctly afterwards and dont be stuck in a spatialite interactive shell.