mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
22 lines
539 B
Bash
22 lines
539 B
Bash
#!/bin/bash
|
|
|
|
# fail if trying to reference a variable that is not set.
|
|
set -u
|
|
# exit immediately if a command exits with a non-zero status
|
|
set -e
|
|
|
|
touch ~/.psqlrc;
|
|
|
|
if grep -Fq "helio_api_catalog" ~/.psqlrc; then
|
|
echo ":heliodb command already set"
|
|
else
|
|
echo "\set heliodb 'SET search_path TO helio_core,helio_api_catalog,public;'" >> ~/.psqlrc
|
|
fi
|
|
|
|
if grep -Fq "bsonUseEJson" ~/.psqlrc; then
|
|
echo "BsonTextRepresentation already set"
|
|
else
|
|
echo "SET helio_core.bsonUseEJson TO true;" >> ~/.psqlrc
|
|
fi
|
|
|
|
export PSQLRC=~/.psqlrc |