As noted in Jody's blog-post regarding this same subject, there are a number of tools out there which allow for simple cvs checkout from Drupal's repository. Unfortunately, they need to be installed separately for each website, which can be a pain.
Rather than continue the tedious task of looking up cvs commands everytime I want to checkout a drupal theme or drupal itself, I updated Jody's drcvs command to allow for more than just module checkout.
How to set it up:(Tested on Mac and Ubuntu)
- Open a new Terminal, navigate to the /usr/bin folder
- Create a new text file called 'drcvs' with some command line text editor( vi, vim, mate, emacs, etc... )
vi drcvsNote: if you are not the root user, you may have to use 'sudo vi drcvs'
- Paste this code into the new file:
#!/bin/bash if [ $1 == -t ] then cvs -z6 -d:pserver:anonymous:email@example.com:/cvs/drupal-contrib checkout -r $3 -d $2 contributions/themes/$2 elif [ $1 == -d ] then cvs -z6 -d:pserver:anonymous:firstname.lastname@example.org:/cvs/drupal co -d $2 -r $3 drupal elif [ $1 == -l ] then export CVSROOT=:pserver:$email@example.com:/cvs/drupal-contrib cvs login else cvs -z6 -d:pserver:anonymous:firstname.lastname@example.org:/cvs/drupal-contrib checkout -r $2 -d $1 contributions/modules/$1 fi
- Save the file (in vi, or vim type ':wq').
- To prevent getting 'permission denied errors', you can then run the following commands at the shell prompt:
cd /usr/bin sudo chmod 755 drcvs
How to use the command at the shell prompt:
- Checking out a module
drcvs "module-name" "tag"
- Checking out a theme
drcvs -t "theme-name" "tag"
- Checking out drupal
drcvs -d "local-folder-name" "tag"
- For module maintainers - make the Drupal contributions repository your CVS root and login with CVS account.
drcvs -l "user-name"
Examples:(You'll need to look up the tags from drupal.org. You'll also need to navigate to the folder within which you want the module/theme/drupal to be placed.)
- Checkout version 5.x-1.6 of the views module:
drcvs views DRUPAL-5--1-6
- Checkout version 6.x-1.0 of the zen theme
drcvs -t zen DRUPAL-6--1-0
- Checkout the latest version of Drupal into the folder examplesite
drcvs -d examplesite HEAD
- Set your CVSROOT to the Drupal contributions repository and CVS login using cvs_username
drcvs -l cvs_username