2020-02-27 17:25:54 +05:30
|
|
|
version=${1/./}
|
2020-05-07 17:14:15 +05:30
|
|
|
extension=${2}
|
|
|
|
extension_version=$(echo "$extension" | cut -d '-' -f 2)
|
|
|
|
if [ "$extension_version" = "blackfire" ]; then
|
|
|
|
extension_version=$(curl -sSL https://blackfire.io/docs/up-and-running/update | grep 'class="version"' | sed -e 's/<[^>]*>\| //g' | sed -n '3,3p')
|
|
|
|
fi
|
2020-02-27 17:25:54 +05:30
|
|
|
ext_dir=$(php -i | grep "extension_dir => /" | sed -e "s|.*=> s*||")
|
|
|
|
scan_dir=$(php --ini | grep additional | sed -e "s|.*: s*||")
|
|
|
|
ini_file="$scan_dir/50-blackfire.ini"
|
|
|
|
sudo curl -o $ext_dir/blackfire.so -SL https://packages.blackfire.io/binaries/blackfire-php/$extension_version/blackfire-php-linux_amd64-php-$version.so
|
|
|
|
echo "extension=blackfire.so" | sudo tee -a "$ini_file"
|