Improve blackfire installation

Test: blackfire
pull/419/head
Michele Locati 2021-08-12 18:00:13 +02:00
parent 61114671c1
commit 590125bc51
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
1 changed files with 9 additions and 12 deletions

View File

@ -1657,24 +1657,21 @@ installRemoteModule() {
blackfire)
case $(uname -m) in
i386 | i686 | x86)
architecture="i386"
;;
x86_64 | amd64)
architecture="amd64"
installRemoteModule_tmp1=i386
;;
aarch64 | arm64 | armv8)
architecture="arm64"
installRemoteModule_tmp1=arm64
;;
*)
architecture="amd64"
installRemoteModule_tmp1=amd64
;;
esac
version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;")
curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version
mkdir -p /tmp/blackfire
tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire
mv /tmp/blackfire/blackfire-*.so $(getPHPExtensionsDir)/blackfire.so
rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
installRemoteModule_tmp2=$(php -r 'echo PHP_MAJOR_VERSION . PHP_MINOR_VERSION;')
installRemoteModule_tmp="$(mktemp -p /tmp/src -d)"
cd "$installRemoteModule_tmp"
curl -sSLf --user-agent Docker https://blackfire.io/api/v1/releases/probe/php/linux/$installRemoteModule_tmp1/$installRemoteModule_tmp2 | tar xz
mv blackfire-*.so $(getPHPExtensionsDir)/blackfire.so
cd - >/dev/null
installRemoteModule_manuallyInstalled=1
;;
cmark)