Installing drush

Here are some commands for installing drush from the command line

sudo apt-get install php-pear
pear channel-discover
pear install drush/drush
drush version
pear upgrade drush/drush

But this is the new preferred way using Composer on *nix

# install composer
curl -sS | php -- --install-dir=bin --filename=composer
# You may need to mkdir ~/bin first if you don't have one.

#move it global
sudo mv ~/bin/composer /usr/local/bin/composer

#make your bin path known Substitute bashrc if you are using bash.
echo "PATH=$HOME/bin:$PATH" >> ~/.zshrc
source ~/.zshrc


# Get drush
composer global require 'drush/drush:6.*'

If it worked, drush at the command line should spit back a bunch of help.

Install coder to support drush

composer global require drupal/coder:\>7

drush pm-download coder --destination=$HOME/.drush

#install CodeSniffer
composer global require squizlabs/PHP_CodeSniffer:\<2


Install dcq for precommit hooks style review

cd ~/.drush/commands
drush dl dcq

Now go to any drupal site that is git controlled and run drush dcq and you should see a message like
"Installed pre-commit hooks in ... "
Now whenever you make a commit of files on that reopository, code quality review will take place and interrupt the commit if there are issues. Just remember, if it finds issues and you fix them, you will need to git add them right after you fix the last issue, or the commit will just include your faulty work.