Even Faster Drupal Installation
In previous posts I have demonstrated how CVS can be used to speed up Drupal installation and updates. However, if you're anything like me you end up installing dozens of contributed modules every time you create a new site. As a result, you have to type the same shell commands over and over again. Tonight I found out a way to automate the process a little more by using shell scripting. Here's what I do:
1.) Create a file named something like 'contrib_install.sh' with your favorite text editor:
#! /bin/bash
#ADMIN MENU 6--1-5
cvs -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d sites/all/modules/admin_menu -r DRUPAL-6--1-5 contributions/modules/admin_menu
#etc, etc for each module you commonly
Note that the download directory is relative to the site's root directory.
2.) Upload the file to your site root directory, go to that directory in your ssh terminal, and change the file's permissions:
chmod 700 contrib_install.sh
3. Execute the script:
./contrib_install.sh
4.) Watch the cvs checkouts all happen sequentially
5.) You should probably go ahead and delete the script or change its permissions after you're done.
You can just keep your local copy of the script up-to-date with module versions. Then the next time that you need to checkout all your common contributed modules on a new install, it will take less than a minute to do so. There may be even more efficient ways to do this, but for now I'm excited to use this knowledge on future sites.




Comments
Post new comment