Checking Out Drupal Modules from CVS

One of the great advantages of using Drupal for website content, is the enormous amount of modules available to enhance end-user experiences. In general I try to use the CVS versions of Drupal, for easy upgrade capabilities. In the same way I prefer to use CVS to check-out the modules that I add-on.

I have written a simple script to automate the download of modules from CVS into the site. The script lives outside the Drupal folder, to keep the Drupal folder clean.


[root@host drupal]# cat ../comodule
#!/bin/sh
echo cvs co -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal -d sites/all/modules/$1 -r DRUPAL-5 contributions/modules/$1
cvs co -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal -d sites/all/modules/$1 -r DRUPAL-5 contributions/modules/$1
[root@host drupal]#

The script is designed to be run from inside the Drupal root folder. It echo's what it will do, and then performs the check-out.

Simply append the module name to the script. To check out the “spellcheck” module:


[root@host drupal]# ../comodule spellcheck
cvs co -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal -d sites/all/modules/spellcheck -r DRUPAL-5 contributions/modules/spellcheck
cvs checkout: Updating sites/all/modules/spellcheck
U sites/all/modules/spellcheck/CHANGELOG
U sites/all/modules/spellcheck/INSTALL
U sites/all/modules/spellcheck/MAINTAINERS.txt
U sites/all/modules/spellcheck/README.txt
U sites/all/modules/spellcheck/blank.html
U sites/all/modules/spellcheck/controlWindow.js
U sites/all/modules/spellcheck/controls.html
U sites/all/modules/spellcheck/spellChecker.js
U sites/all/modules/spellcheck/spellcheck.css
U sites/all/modules/spellcheck/spellcheck.info
U sites/all/modules/spellcheck/spellcheck.module
U sites/all/modules/spellcheck/spellchecker.html
U sites/all/modules/spellcheck/spellchecker.php
U sites/all/modules/spellcheck/wordWindow.js
[root@host drupal]#

The module will now be available in the Drupal modules menu.

Leave a Reply

Your email address will not be published. Required fields are marked *