Skip to content

Commit 39276ba

Browse files
committed
Fix blackfire
1 parent 799d10e commit 39276ba

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

extensions/core/blackfire/install.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,30 @@ fi
1616

1717
mkdir /tmp/blackfire
1818

19-
# Todo: Maybe version the Blackfire version by environment variable? :)
20-
2119
if [ $BLACKFIRE_VERSION == "1" ]; then
2220
echo "Installing Blackfire version 1"
2321
# curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v2/releases/probe/php/linux/amd64/$version
24-
curl -o /tmp/blackfire/blackfire.so "https://packages.blackfire.io/binaries/blackfire-php/1.78.0/blackfire-php-$CONTAINER_OS"_"$CONTAINER_ARCH-php-$version.so"
22+
curl -o /tmp/blackfire/blackfire.so "https://packages.blackfire.io/binaries/blackfire-php/1.78.0/blackfire-php-${TARGETOS}"_"${TARGETARCH}-php-${version}.so"
2523
mv /tmp/blackfire/blackfire.so $(php -r "echo ini_get('extension_dir');")/blackfire.so
26-
echo "extension=blackfire.so" > /etc/php/${PHP_VERSION}/mods-available/blackfire.ini
24+
echo "extension=blackfire" > /etc/php/${PHP_VERSION}/mods-available/blackfire.ini
2725

2826
# Adding this in the list of Ubuntu extensions because we use that list as a base for the modules list.
2927
# TODO: question: cannot we use /etc/php/mods-available instead???
3028
touch /var/lib/php/modules/${PHP_VERSION}/registry/blackfire
3129
# curl -A "Docker" -L https://blackfire.io/api/v1/releases/client/linux_static/amd64 | tar zxp -C /tmp/blackfire
32-
curl -o /tmp/blackfire/blackfire "https://packages.blackfire.io/binaries/blackfire-agent/1.50.0/blackfire-cli-$CONTAINER_OS"_"$CONTAINER_ARCH"
30+
curl -o /tmp/blackfire/blackfire "https://packages.blackfire.io/binaries/blackfire-agent/1.50.0/blackfire-cli-${TARGETOS}"_"${TARGETARCH}"
3331
chmod +x /tmp/blackfire/blackfire
3432
mv /tmp/blackfire/blackfire /usr/bin/blackfire
3533
rm -Rf /tmp/blackfire
3634

3735
elif [ $BLACKFIRE_VERSION == "2" ]; then
3836
echo "Installing Blackfire version 2..."
3937

40-
curl -o /tmp/blackfire/blackfire.so "https://packages.blackfire.io/binaries/blackfire-php/1.78.0/blackfire-php-$CONTAINER_OS"_"$CONTAINER_ARCH-php-$version.so"
38+
curl -o /tmp/blackfire/blackfire.so "https://packages.blackfire.io/binaries/blackfire-php/1.78.0/blackfire-php-${TARGETOS}"_"${TARGETARCH}-php-${version}.so"
4139
mv /tmp/blackfire/blackfire.so $(php -r "echo ini_get('extension_dir');")/blackfire.so
4240
echo "extension=blackfire.so" > /etc/php/${PHP_VERSION}/mods-available/blackfire.ini
4341
touch /var/lib/php/modules/${PHP_VERSION}/registry/blackfire
44-
curl -o /tmp/blackfire-cli.tar.gz "https://packages.blackfire.io/binaries/blackfire/2.10.0/blackfire-"$CONTAINER_OS"_"$CONTAINER_ARCH".tar.gz"
42+
curl -o /tmp/blackfire-cli.tar.gz "https://packages.blackfire.io/binaries/blackfire/2.10.0/blackfire-"${TARGETOS}"_"${TARGETARCH}".tar.gz"
4543
tar zxpf /tmp/blackfire-cli.tar.gz -C /tmp/blackfire
4644
mv /tmp/blackfire/blackfire /usr/bin/blackfire
4745

0 commit comments

Comments
 (0)