Skip to content

Commit

Permalink
fix: clean sqlite bash commands
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed Sep 11, 2023
1 parent 158757b commit 891a744
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ mkdir -p "./storage/database"

# Generate the sqlite database for the index backend if it does not exist
if ! [ -f "./storage/database/data.db" ]; then
# todo: it should get the path from config.toml and only do it when we use sqlite
touch ./storage/database/data.db
echo ";" | sqlite3 ./storage/database/data.db
sqlite3 ./storage/database/data.db "VACUUM;"
fi

# Generate storage directory if it does not exist
mkdir -p "./storage/tracker/lib/database"

# Generate the sqlite database for the tracker if it does not exist
if ! [ -f "./storage/database/tracker.db" ]; then
touch ./storage/database/tracker.db
echo ";" | sqlite3 ./storage/database/tracker.db
if ! [ -f "./storage/tracker/lib/database/sqlite3.db" ]; then
sqlite3 ./storage/tracker/lib/database/sqlite3.db "VACUUM;"
fi
1 change: 0 additions & 1 deletion docker/bin/e2e/sqlite/e2e-env-reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ mkdir -p "./storage/database"

# Generate the sqlite database for the index backend if it does not exist
if ! [ -f "./storage/database/torrust_index_backend_e2e_testing.db" ]; then
# todo: it should get the path from config.toml and only do it when we use sqlite
sqlite3 ./storage/database/torrust_index_backend_e2e_testing.db "VACUUM;"
fi

Expand Down

0 comments on commit 891a744

Please sign in to comment.