Skip to content

Instantly share code, notes, and snippets.

@gabssnake
Forked from johnpbloch/composer.json
Created April 20, 2013 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabssnake/5425871 to your computer and use it in GitHub Desktop.
Save gabssnake/5425871 to your computer and use it in GitHub Desktop.
Install PhpUnit globally with Composer
{
"name": "phpunit",
"description": "PHPUnit Composer Package",
"require": {
"phpunit/phpunit": "3.7.*"
},
"config": {
"bin-dir": "/usr/local/bin/"
}
}
#!/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