#!/bin/bash
# Setup script for Vehicle Database

echo "Vehicle Database Setup"
echo "======================"

# Check if Python3 is available
if ! command -v python3 &> /dev/null; then
    echo "Python3 is required but not installed. Please install Python3 first."
    exit 1
fi

echo "Python3 is available."

# Check if the database already exists
if [ -f "vehicle_database.db" ]; then
    echo "Database already exists."
else
    echo "Creating new database with sample data..."
    python3 scripts/database_manager.py
fi

echo ""
echo "Setup complete! Available scripts:"
echo "1. Query Interface: python3 scripts/query_interface.py"
echo "2. Database Manager: python3 scripts/database_manager.py"
echo "3. CSV Importer: python3 scripts/csv_importer.py"
echo ""
echo "To start querying the database, run: python3 scripts/query_interface.py"