Skip to content

Commit 7fa8f52

Browse files
committed
cs fixes
1 parent e5d0641 commit 7fa8f52

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

build-static.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ else
147147
if [ "${SPC_REL_TYPE}" = "binary" ]; then
148148
mkdir static-php-cli/
149149
cd static-php-cli/
150-
curl -o spc -fsSL https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-$(uname -m)
150+
curl -o spc -fsSL "https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-$(uname -m)"
151151
chmod +x spc
152152
spcCommand="./spc"
153153
elif [ -d "static-php-cli/src" ]; then
@@ -183,9 +183,9 @@ else
183183
fi
184184

185185
${spcCommand} doctor --auto-fix
186-
${spcCommand} download --with-php="${PHP_VERSION}" --for-extensions="${PHP_EXTENSIONS}" --for-libs="${PHP_EXTENSION_LIBS}" ${SPC_OPT_DOWNLOAD_ARGS}
186+
${spcCommand} download --with-php="${PHP_VERSION}" --for-extensions="${PHP_EXTENSIONS}" --for-libs="${PHP_EXTENSION_LIBS}" "${SPC_OPT_DOWNLOAD_ARGS}"
187187
# shellcheck disable=SC2086
188-
${spcCommand} build --enable-zts --build-embed ${SPC_OPT_BUILD_ARGS} "${PHP_EXTENSIONS}" --with-libs="${PHP_EXTENSION_LIBS}"
188+
${spcCommand} build --enable-zts --build-embed "${SPC_OPT_BUILD_ARGS}" "${PHP_EXTENSIONS}" --with-libs="${PHP_EXTENSION_LIBS}"
189189
fi
190190

191191
if ! type "go" >/dev/null 2>&1; then
@@ -252,8 +252,8 @@ if [ "${os}" = "linux" ]; then
252252
CGO_LDFLAGS="${CGO_LDFLAGS} -lstdc++"
253253
fi
254254
if [ "${SPC_LIBC}" = "glibc" ]; then
255-
CGO_LDFLAGS=$(echo "$CGO_LDFLAGS" | sed 's|-lphp|-Wl,--whole-archive -lphp -Wl,--no-whole-archive|g')
256-
ar d ${PWD}/buildroot/lib/libphp.a $(ar t ${PWD}/buildroot/lib/libphp.a | grep '\.a$')
255+
CGO_LDFLAGS="${CGO_LDFLAGS//-lphp/-Wl,--whole-archive -lphp -Wl,--no-whole-archive}"
256+
ar d "${PWD}/buildroot/lib/libphp.a" "$(ar t "${PWD}/buildroot/lib/libphp.a" | grep '\.a$')"
257257
fi
258258
fi
259259

0 commit comments

Comments
 (0)