19 lines
479 B
Bash
Executable File
19 lines
479 B
Bash
Executable File
#!/bin/bash
|
|
# Load environment variables from .env file
|
|
|
|
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
PROJECT_DIR=$(cd "$SCRIPT_DIR/.." && pwd)
|
|
ENV_FILE="$PROJECT_DIR/.env"
|
|
|
|
if [ -f "$ENV_FILE" ]; then
|
|
# Export variables from .env file
|
|
set -a
|
|
source "$ENV_FILE"
|
|
set +a
|
|
echo "✅ Loaded environment from .env"
|
|
else
|
|
echo "⚠️ No .env file found at $ENV_FILE"
|
|
echo " Copy .env.example to .env and configure your settings"
|
|
exit 1
|
|
fi
|