Skip to content

Commit c5fbf6e

Browse files
committed
update
1 parent 0adfcb2 commit c5fbf6e

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

sapi/quickstart/build-native-php-example.sh

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
#!/bin/env bash
22
set -uex
33

4-
54
OS=$(uname -s)
65
ARCH=$(uname -m)
76

8-
97
export CC=clang
108
export CXX=clang++
119
export LD=ld.lld
1210

13-
if [ "$OS" = 'Linux' ] ;then
11+
if [ "$OS" = 'Linux' ]; then
1412

15-
: <<'EOF'
13+
: <<'EOF'
1614
# setup container environment
1715
1816
docker run --rm -ti --init -v .:/work -w /work debian:11
@@ -24,15 +22,12 @@ EOF
2422

2523
fi
2624

25+
if [ "$OS" = 'Darwin' ]; then
2726

28-
if [ "$OS" = 'Darwin' ] ;then
29-
30-
export PATH=/usr/local/opt/bison/bin/:/usr/local/opt/llvm/bin/:$PATH
27+
export PATH=/usr/local/opt/bison/bin/:/usr/local/opt/llvm/bin/:$PATH
3128

3229
fi
3330

34-
35-
3631
mkdir -p /tmp/t
3732
cd /tmp/t
3833

@@ -53,10 +48,6 @@ tar --strip-components=1 -C mongodb -xf mongodb-${MONGODB_VERSION}.tgz
5348
test -d php-src/ext/mongodb && rm -rf php-src/ext/mongodb
5449
mv mongodb php-src/ext/
5550

56-
57-
58-
59-
6051
cd php-src
6152

6253
./buildconf --force
@@ -83,13 +74,11 @@ cd php-src
8374

8475
make -j $(nproc)
8576

86-
87-
if [ "$OS" = 'Linux' ] ;then
77+
if [ "$OS" = 'Linux' ]; then
8878

8979
file sapi/cli/php
9080
readelf -h sapi/cli/php
9181

9282
else
93-
otool -L sapi/cli/php
83+
otool -L sapi/cli/php
9484
fi
95-

0 commit comments

Comments
 (0)