Merge pull request #419 from mlocati/blackfire

Improve blackfire installation
pull/421/head 1.2.55
Michele Locati 2021-08-12 18:05:11 +02:00 committed by GitHub
commit 124c35a9d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)