Files
documentdb/scripts/setup_psqlrc.sh
T
Santiago Fernandez Madero 5b54c839f3 Merged PR 1432746: Chmod +x all scripts
### Does this PR have any customer impact?

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)

### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)

### Are you introducing any new config? If yes, do you have tests with and without them being set?

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

Chmod +x all scripts
2024-08-16 18:24:51 +03:00

22 lines
539 B
Bash
Executable File

#!/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