-
-
Save dariodiaz/6201558 to your computer and use it in GitHub Desktop.
PHP: phpunit global installation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "phpunit", | |
"description": "PHPUnit Composer Package", | |
"require": { | |
"phpunit/phpunit": "3.7.*" | |
}, | |
"config": { | |
"bin-dir": "/usr/local/bin/" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
mkdir -p /usr/local/lib/phpunit | |
mv composer.json /usr/local/lib/phpunit | |
cd /usr/local/lib/phpunit | |
if [ `which composer` ]; then | |
composer install | |
else | |
if [ ! -f './composer.phar' ]; then | |
curl -sS https://getcomposer.org/installer | php | |
fi | |
php composer.phar install | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment