Warning, file /sdk/codevis/thirdparty/soci/scripts/ci/install_odbc.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 # Install ODBC libraries for SOCI in CI builds
0003 #
0004 # Copyright (c) 2013 Mateusz Loskot <mateusz@loskot.net>
0005 #
0006 source ${SOCI_SOURCE_DIR}/scripts/ci/common.sh
0007 
0008 # Remove buggy versions of the packages from Microsoft repositories as well as
0009 # their dependencies.
0010 run_apt remove \
0011     libodbc1 odbcinst1debian2 \
0012     unixodbc unixodbc-dev
0013 
0014 run_apt install \
0015     tar bzip2 \
0016     unixodbc unixodbc-dbgsym unixodbc-dev \
0017     odbc-postgresql odbc-postgresql-dbgsym postgresql
0018 
0019 # Use full path to the driver library to avoid errors like
0020 # [01000][unixODBC][Driver Manager]Can't open lib 'psqlodbca.so' : file not found
0021 psqlodbca_lib=$(dpkg -L odbc-postgresql | grep -F 'psqlodbca.so')
0022 sudo sed -i'' -e "s@^Driver=psqlodbca\.so@Driver=$psqlodbca_lib@" /etc/odbcinst.ini
0023 
0024 echo Contents of /etc/odbcinst.ini
0025 echo '---------------------------------- >8 --------------------------------------'
0026 cat /etc/odbcinst.ini
0027 echo '---------------------------------- >8 --------------------------------------'