-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #838 from The-Frozen-North/store-databases-as-txt-…
…and-migrate-linux-to-build-scripts Store databases as txt and migrate linux to build scripts
- Loading branch information
Showing
25 changed files
with
76,993 additions
and
102 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
|
||
$PWD/tools/linux/nasher/nasher unpack --file:modules/TFN --removeDeleted --erfUtil:"$PWD/tools/linux/neverwinter/nwn_erf" --gffUtil:"$PWD/tools/linux/neverwinter/nwn_gff" --tlkUtil:"$PWD/tools/linux/neverwinter/nwn_tlk" --nssFlags:"-l" | ||
$PWD/tools/linux/nasher/nasher unpack --file:.build/modules/TFN --removeDeleted --erfUtil:"$PWD/tools/linux/neverwinter/nwn_erf" --gffUtil:"$PWD/tools/linux/neverwinter/nwn_gff" --tlkUtil:"$PWD/tools/linux/neverwinter/nwn_tlk" --nssFlags:"-l" | ||
git rm --cached src -r | ||
git add . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
#!/bin/bash | ||
|
||
rm database/randspellbooks.sqlite3 | ||
rm database/treasures.sqlite3 | ||
rm database/spawns.sqlite3 | ||
rm database/prettify.sqlite3 | ||
rm database/tmapsolutions.sqlite3 | ||
rm database/areadistances.sqlite3 | ||
mkdir -p .build/config | ||
|
||
cp seeded_database/spawns.sqlite3 database/spawns.sqlite3 | ||
cp seeded_database/treasures.sqlite3 database/treasures.sqlite3 | ||
cp seeded_database/randspellbooks.sqlite3 database/randspellbooks.sqlite3 | ||
cp seeded_database/prettify.sqlite3 database/prettify.sqlite3 | ||
cp seeded_database/tmapsolutions.sqlite3 database/tmapsolutions.sqlite3 | ||
cp seeded_database/areadistances.sqlite3 database/areadistances.sqlite3 | ||
rm .build/docker-compose-dev.yml | ||
cp docker-compose-dev.yml .build/docker-compose-dev.yml | ||
|
||
rm .build/config/common.env | ||
cp config/common.env .build/config/common.env | ||
|
||
cd .build | ||
|
||
docker-compose -f docker-compose-dev.yml down | ||
docker-compose -f docker-compose-dev.yml up --no-recreate -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,51 @@ | ||
#!/bin/bash | ||
|
||
rm database/prettify.sqlite3 | ||
rm database/areadistances.sqlite3 | ||
rm database/tmapsolutions.sqlite3 | ||
rm .build/database/prettify.sqlite3 | ||
rm .build/database/areadistances.sqlite3 | ||
rm .build/database/tmapsolutions.sqlite3 | ||
|
||
cp seeded_database/prettify.sqlite3 database/prettify.sqlite3 | ||
cp seeded_database/areadistances.sqlite3 database/areadistances.sqlite3 | ||
cp seeded_database/tmapsolutions.sqlite3 database/tmapsolutions.sqlite3 | ||
mkdir -p .build/database | ||
mkdir -p .build/config | ||
|
||
# Delete existing databases, because sqlite will attempt to load it into an existing database instead of overwriting | ||
rm .build/database/spawns.sqlite3 | ||
rm .build/database/treasures.sqlite3 | ||
rm .build/database/randspellbooks.sqlite3 | ||
rm .build/database/prettify.sqlite3 | ||
rm .build/database/tmapsolutions.sqlite3 | ||
rm .build/database/areadistances.sqlite3 | ||
|
||
# These databases rely on previous information (checks existing and may skip recalculating some things so it's faster) | ||
$PWD/tools/linux/sqlite/sqlite3 .build/database/treasures.sqlite3 < seeded_database/treasures.txt | ||
$PWD/tools/linux/sqlite/sqlite3 .build/database/tmapsolutions.sqlite3 < seeded_database/tmapsolutions.txt | ||
$PWD/tools/linux/sqlite/sqlite3 .build/database/randspellbooks.sqlite3 < seeded_database/randspellbooks.txt | ||
$PWD/tools/linux/sqlite/sqlite3 .build/database/prettify.sqlite3 < seeded_database/prettify.txt | ||
$PWD/tools/linux/sqlite/sqlite3 .build/database/areadistances.sqlite3 < seeded_database/areadistances.txt | ||
|
||
rm .build/docker-compose-dev-seed.yml | ||
cp docker-compose-dev-seed.yml .build/docker-compose-dev-seed.yml | ||
|
||
rm .build\config\common.env | ||
cp config/common.env .build/config/common.env | ||
|
||
cd .build | ||
|
||
docker-compose -f docker-compose-dev-seed.yml down | ||
docker-compose -f docker-compose-dev-seed.yml up --no-recreate | ||
|
||
rm seeded_database/randspellbooks.sqlite3 | ||
rm seeded_database/treasures.sqlite3 | ||
rm seeded_database/spawns.sqlite3 | ||
rm seeded_database/prettify.sqlite3 | ||
rm seeded_database/areadistances.sqlite3 | ||
rm seeded_database/tmapsolutions.sqlite3 | ||
|
||
cp database/spawns.sqlite3 seeded_database/spawns.sqlite3 | ||
cp database/treasures.sqlite3 seeded_database/treasures.sqlite3 | ||
cp database/randspellbooks.sqlite3 seeded_database/randspellbooks.sqlite3 | ||
cp database/prettify.sqlite3 seeded_database/prettify.sqlite3 | ||
cp database/areadistances.sqlite3 seeded_database/areadistances.sqlite3 | ||
cp database/tmapsolutions.sqlite3 seeded_database/tmapsolutions.sqlite3 | ||
# Delete existing database dumps, because we should always get the newly generated ones | ||
rm ../seeded_database/spawns.txt | ||
rm ../seeded_database/treasures.txt | ||
rm ../seeded_database/randspellbooks.txt | ||
rm ../seeded_database/prettify.txt | ||
rm ../seeded_database/tmapsolutions.txt | ||
rm ../seeded_database/areadistances.txt | ||
|
||
$PWD/../tools/linux/sqlite/sqlite3 database/treasures.sqlite3 .dump > ../seeded_database/treasures.txt | ||
$PWD/../tools/linux/sqlite/sqlite3 database/tmapsolutions.sqlite3 .dump > ../seeded_database/tmapsolutions.txt | ||
$PWD/../tools/linux/sqlite/sqlite3 database/spawns.sqlite3 .dump > ../seeded_database/spawns.txt | ||
$PWD/../tools/linux/sqlite/sqlite3 database/randspellbooks.sqlite3 .dump > ../seeded_database/randspellbooks.txt | ||
$PWD/../tools/linux/sqlite/sqlite3 database/prettify.sqlite3 .dump > ../seeded_database/prettify.txt | ||
$PWD/../tools/linux/sqlite/sqlite3 database/areadistances.sqlite3 .dump > ../seeded_database/areadistances.txt | ||
|
||
python3 ../tools/replace_database_migration_numbers.py |
Binary file not shown.
Oops, something went wrong.