2022-08-15 20:25:31 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-08-06 21:18:08 +00:00
|
|
|
set -e
|
|
|
|
|
2024-03-19 18:22:26 +00:00
|
|
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
|
|
echo "Linux dependencies..."
|
|
|
|
script/linux
|
2024-03-21 03:00:02 +00:00
|
|
|
else
|
|
|
|
echo "installing foreman..."
|
|
|
|
which foreman > /dev/null || brew install foreman
|
2024-03-19 18:22:26 +00:00
|
|
|
fi
|
2024-03-21 03:00:02 +00:00
|
|
|
|
2024-08-06 21:18:08 +00:00
|
|
|
# Install sqlx-cli if needed
|
2024-08-08 14:10:18 +00:00
|
|
|
if [[ "$(sqlx --version)" != "sqlx-cli 0.7.2" ]]; then
|
|
|
|
echo "sqlx-cli not found or not the required version, installing version 0.7.2..."
|
|
|
|
cargo install sqlx-cli --version 0.7.2
|
2024-08-06 21:18:08 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
cd crates/collab
|
|
|
|
|
|
|
|
# Export contents of .env.toml
|
|
|
|
eval "$(cargo run --bin dotenv)"
|
|
|
|
|
|
|
|
echo "creating databases..."
|
|
|
|
sqlx database create --database-url "$DATABASE_URL"
|
|
|
|
sqlx database create --database-url "$LLM_DATABASE_URL"
|