Drupal CVS/SVN module script

I use a little command line script to work with my Drupal modules. Some people like other tools like Drush, or some of the other update tools that are available. What I wanted is something that could pull down new versions of modules from CVS and check them straight into SVN. This is a small script that I use to do this- it has options to just download from CVS, update a module to a new release, and check your changes into SVN as well. I modified it a bit for public use- your millage may vary.

$ sh ~/bin/dmi -h
This scripts helps you install Drupal modules from CVS.
Syntax is: dmi -v DRUPAL_VERSION DRUPAL_MODULE_NAME DRUPAL_MODULE_RELEASE
If -v is not supplied, dmi assumes Drupal version  This default value can be set in the script.
If DRUPAL_MODULE_RELEASE is not supplied, dmi will attempt to use the branch version
Example: dmi -v 5 views 1-6
Please note that you must use the actual Drupal CVS tags, ie: 1.6 will not work
Options:
 -h this help menu
 -f append the version number on the module directory
 -u update the currently installed module to the requested version. Use the path to your current module, not module name
 -v specify which Drupal version to use
 -s add or update SVN as well

You can download the script here.

Comments

wow, i just wrote a small script a few days ago to do basically the same thing.

great minds think alike :)

ya, im not huge on drush / update_status module setups yet.

update_status requires non cvs versions.

drush, i so far haven't dug into as much as i like, and i do like what it can do, but so far from what little time i have spent on it, i haven't found it able to handle my custom file structure where I use sym links to bring in custom / contrib modules and themes into the core code base so its easier to maintain.

if im just being a retard about this and missing something, please tell me. lol.

update_status works fine with CVS versions as long as you have the cvs_deploy module enabled.

In terms of getting drush working, if you need to add a drushrc.php file to your site folder (next to settings.php) that specifies the Drupal root folder and domain to use for that site - e.g.

$options['l'] = 'http://localhost/mysite';
$options['r'] = '/home/myuser/workspace/drupal-6/';

I have been using an alias in .bash_profle for this, but this looks like it might be more useful. There's only so much you can do with aliases: alias drupal-checkout="cvs -d :pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout -d"