diff --git a/src/scripts/extensions/sqlsrv.sh b/src/scripts/extensions/sqlsrv.sh index 22e6cf43..a3639201 100644 --- a/src/scripts/extensions/sqlsrv.sh +++ b/src/scripts/extensions/sqlsrv.sh @@ -7,9 +7,18 @@ get_sqlsrv_version() { fi } +add_unixodbc() { + if [ "$(uname -s)" = 'Linux' ]; then + install_packages unixodbc-dev + else + brew install unixodbc + fi +} + # Function to install sqlsrv and pdo_sqlsrv. add_sqlsrv() { ext=$1 ext_version=$(get_sqlsrv_version) + add_unixodbc >/dev/null 2>&1 add_pecl_extension "$ext" "$ext_version" extension }