#!/bin/bash # init script database_name="dev.db" database_path="database" function install_dependencies() { sudo apt install sqlite3 } function install_crates() { cargo install sea-orm-cli } function initialize_database() { if [ $(find "$database_path" -name "*.sqlite" -o -name "*.sqlite3" -o -name "*.db" | wc -l) -gt 0 ]; then echo "SQLite database files exist in $database_path" else echo "No SQLite database files found in $database_path" # TODO: sqlite3 $database_path$database_name fi } function migrate_database() { sea-orm-cli migrate init } initialize_database