mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 13:23:05 +07:00
Add unixodbc if missing in sqlsrv setup
This commit is contained in:
parent
16de39288a
commit
fe9e23a16a
@ -7,9 +7,18 @@ get_sqlsrv_version() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
add_unixodbc() {
|
||||||
|
if [ "$(uname -s)" = 'Linux' ]; then
|
||||||
|
install_packages unixodbc-dev
|
||||||
|
else
|
||||||
|
brew install unixodbc
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Function to install sqlsrv and pdo_sqlsrv.
|
# Function to install sqlsrv and pdo_sqlsrv.
|
||||||
add_sqlsrv() {
|
add_sqlsrv() {
|
||||||
ext=$1
|
ext=$1
|
||||||
ext_version=$(get_sqlsrv_version)
|
ext_version=$(get_sqlsrv_version)
|
||||||
|
add_unixodbc >/dev/null 2>&1
|
||||||
add_pecl_extension "$ext" "$ext_version" extension
|
add_pecl_extension "$ext" "$ext_version" extension
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user