Shell Scripts

Shell scripts for installing Drupal, modules and themes.

Install drupal with cURL

<?php

/**
 * playing around with curl. Here is an example of using curl for installing drupal
 * without using the browser
 *
 * Just change different settings and run
 * php drupal-curl.php
 *
 * Script will produce html for all urls visited.

Drush shell scripts for creating drupal sites

README.txt

Note: I have added the densite scripts to the drupal website and you can find the latest version on this address http://drupal.org/project/densite

Shell Script For Downloading and Installing Drupal Themes

#!/bin/bash

###################################################
#
# Got tired of downloading / unpacking / moving
# when I tested Drupal themes.

Shell script for downloading and installing Drupal modules

#!/bin/bash

# Note (22/5-09)
# you can use a module called drush for the same
# See: http://drupal.org/project/drush
#
# when you have drush installed. You just:
#
# drush dl modulename (and then inside your module dir:)
# drush enable modulename
#

###################################################
#
# Got tired of downloading / unpacking / moving
# packages when I tested Drupal modules.

Shell Script For Creating Virtual Drupal Hosts From Single Codebase

Note (7/6-09): I have made a drush extension which you can find at http://www.os-cms.net/node/46 This extension does the same as this shell script but also a lot more. Your can use this extension to even more easily create virtual hosts.

The script does the following:

  • Creates new site folder inside drupal sites/ eg. sites/dev.os-cms.net with files dir and settings.php
  • Writes database url to sites/www.os-cms.net/settings.php
  • Creates seperate folder for holding apache logs/ for your new domain

Shell scripts

In this section you can find a couple of shell scripts, which you may find useful. There are two scripts for making Apache virtual host and Drupal installations on-the-fly. The first one is for making virtual Apache hosts and drupal installations in a separate web location. The second one is for making Apache virtual hosts and Drupal installations from a single code base. The second script makes a new configuration folder inside sites/ where the Drupal configuration is stored. The first script creates a complete base of drupal files.

Shell Script for Creating Virtual Drupal Hosts From Standalone Codebase

Note (7/6-09): I have made a drush extension which you can find at http://www.os-cms.net/node/46 This extension does the same as this shell script but also a lot more. Your can use this extension to even more easily create virtual hosts.

  • Creates new sites folder inside your www dir eg. eg. /www/dev.os-cms.net/htdocs with files dir and settings.php
  • Writes database url to www.os-cms.net/sites/default/settings.php
  • Creates seperate folder for holding apache logs/ for your new domain
Syndicate content