Warning, file /sdk/codevis/thirdparty/soci/scripts/ci/before_build_postgresql.sh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #!/usr/bin/env bash 0002 # Sets up environment for SOCI backend PostgreSQL in CI builds 0003 # 0004 # Mateusz Loskot <mateusz@loskot.net>, http://github.com/SOCI 0005 # 0006 source ${SOCI_SOURCE_DIR}/scripts/ci/common.sh 0007 0008 case "$(uname)" in 0009 Linux) 0010 sudo service postgresql start 0011 pg_isready --timeout=60 0012 sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'Password12!';" 0013 ;; 0014 0015 Darwin) 0016 pg_ctl init 0017 pg_ctl start 0018 pg_isready --timeout=60 0019 createuser --superuser postgres 0020 ;; 0021 0022 *) 0023 echo 'Unknown OS, PostgreSQL not available' 0024 exit 1 0025 esac 0026 0027 psql --version 0028 psql -c 'create database soci_test;' -U postgres 0029 0030 echo 'Testing connection to the database:' 0031 psql -c 'select user;' -U postgres -d soci_test