Skip to content
Snippets Groups Projects
Commit a6de02f5 authored by Michael Lumish's avatar Michael Lumish
Browse files

Merge pull request #2244 from stanley-cheung/php_minor_script_fix

php minor script fix
parents 587b5f6b 85b5d76c
Branches
Tags
No related merge requests found
...@@ -29,15 +29,15 @@ ...@@ -29,15 +29,15 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set -e set -e
default_extension_dir=$(php -i | grep extension_dir | sed 's/.*=> //g') default_extension_dir=$(php-config --extension-dir)
if command -v brew >/dev/null && [ -d $(brew --prefix)/opt/grpc-php ]; then if command -v brew >/dev/null && [ -d $(brew --prefix)/opt/grpc-php ]; then
# homebrew and the grpc-php formula are installed # homebrew and the grpc-php formula are installed
extension_dir="-d extension_dir="$(brew --prefix)/opt/grpc-php extension_dir="-d extension_dir="$(brew --prefix)/opt/grpc-php
elif [ ! -f $default_extension_dir/grpc.so ]; then elif [ ! -e $default_extension_dir/grpc.so ]; then
# the grpc extension is not found in the default PHP extension dir # the grpc extension is not found in the default PHP extension dir
# try the source modules directory # try the source modules directory
module_dir=../ext/grpc/modules module_dir=../ext/grpc/modules
if [ ! -f $module_dir/grpc.so ]; then if [ ! -e $module_dir/grpc.so ]; then
echo "Please run 'phpize && ./configure && make' from ext/grpc first" echo "Please run 'phpize && ./configure && make' from ext/grpc first"
exit 1 exit 1
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment