Skip to content

Instantly share code, notes, and snippets.

@bskiefer
Last active March 4, 2020 09:26
Show Gist options
  • Save bskiefer/f2b3a217e77ebb8182928e733c89d462 to your computer and use it in GitHub Desktop.
Save bskiefer/f2b3a217e77ebb8182928e733c89d462 to your computer and use it in GitHub Desktop.
PHPBrew Blackfire Extension Installer
#!/usr/bin/env bash
# Automatically finds your php version, installs, and enables the blackfire extension on your current php.
source ~/.phpbrew/bashrc
EXTENSION_URL="https://packages.blackfire.io/binaries/blackfire-php/1.27.0/blackfire-php-linux_amd64-php-VERSION.so"
PHP_VERSION=$(php -r 'echo PHP_MAJOR_VERSION . PHP_MINOR_VERSION;')
EXT_DIR=$(phpbrew path ext)
FINAL_URL=${EXTENSION_URL/VERSION/$PHP_VERSION}
wget -O $EXT_DIR/blackfire.so $FINAL_URL
phpbrew ext enable blackfire
exit 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment