Skip to content

Commit faa975c

Browse files
committed
Fixes build-static script
1 parent d3589f9 commit faa975c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

build-static.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ cache_key="${PHP_VERSION}-${PHP_EXTENSIONS}-${PHP_EXTENSION_LIBS}"
122122
# Build libphp if necessary
123123
if [ -f dist/cache_key ] && [ "$(cat dist/cache_key)" = "${cache_key}" ] && [ -f "dist/static-php-cli/buildroot/lib/libphp.a" ]; then
124124
cd dist/static-php-cli
125+
126+
if [ -f "./spc" ]; then
127+
spcCommand="./spc"
128+
elif [ -f "bin/spc" ]; then
129+
spcCommand="./bin/spc"
130+
fi
125131
else
126132
mkdir -p dist/
127133
cd dist/
@@ -144,10 +150,10 @@ else
144150
fi
145151
fi
146152

147-
if [ "${SPC_REL_TYPE}" = "binary" ]; then
148-
mkdir static-php-cli/
153+
if [ "${SPC_REL_TYPE}" = "binary" && "${arch}" != "arm64" ]; then
154+
mkdir -p static-php-cli/
149155
cd static-php-cli/
150-
curl -o spc -fsSL "https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-$(uname -m)"
156+
curl -o spc -fsSL "https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-${arch}"
151157
chmod +x spc
152158
spcCommand="./spc"
153159
elif [ -d "static-php-cli/src" ]; then

0 commit comments

Comments
 (0)