Last night I felt the need of a new Drupal installer script. My old one (http://itarato.blogspot.com/2009/06/drupal-sandbox-creator-shell-script.html) had some flaws: it used a static preinstalled tarball with a static database dump. My new one use a fresh Drupal 6.15 package and just help to get to the install screen:
echo "> Install Drupal Site - v 0.1"
# Enter the webroot
cd YOURWEBROOT
# Uncompress the latest Drupal tarball
tar -xzf PATHTOTARBALL/drupal-6.15.tar.gz
# Asks for a site name (folder - database in one step)
read -p "> Site name: " site_name
# Rename the web folder
mv drupal-6.15 $site_name
echo "> Site folder is ready"
# Create config files
cd $site_name/sites/default
mkdir files
cp default.settings.php settings.php
# Setting file ownerships
sudo chown WEBSERVERUSER files
sudo chown WEBSERVERUSER settings.php
echo "> Config is ready"
# Creating database
mysql -u root --password=YOURPASSWORD -e "create database $site_name"
# Under OS-X opens a browser with the site's install screen
open http://localhost/$site_name
echo "> Arigato gozai mashi ta!"
Basically you need a Drupal package under: PATHTOTARBALL/drupal-6.15.tar.gz and that's it. Dont't forget to change all the capital letter words to your environment.
Regards,
Peter